title: Program has more than one entry point defined? CS0017 Problem with main()?
body: <p>When I try an run the code below in visual studio I get the following error : &quot;Program has more than one entry point defined. Compile with /main to specify the type that contains the entry point. &quot;</p>
  <p>I've tried finding other entry points but am not that experienced with c# and having trouble with this. To my understanding everything should be correct.</p>
  <pre><code>namespace Demos
  {
  using System;
  using System.Drawing;
  using Applitools;
  using Applitools.Selenium;
  using OpenQA.Selenium;
  using OpenQA.Selenium.Chrome;
  
  public class HelloWorld2
  {
      static string appName = &quot;Hello World 2 App C#&quot;;
  
      // change the value of testName so that it has a unique value on your Eyes system
      static string testName = &quot;Hello World 2 v1&quot;;
  
      // if you have a dedicated Eyes server, set the value of the variable serverURLstr to your URL
      static string serverURLstr = &quot;https://eyesapi.applitools.com&quot;;
  
      //set the value of runAsBatch to true so that the tests run as a single batch
      static Boolean runAsBatch = true;
  
      // set the value of changeTest to true to introduce changes that Eyes will detect as mismatches
      static Boolean changeTest = true;
  
      static string weburl = &quot;https://applitools.com/helloworld2&quot;;
  
      public static void Main(string[] args)
      {
          var eyes = new Eyes();
          eyes.ServerUrl = serverURLstr;
          setup(eyes);
  
          var viewportSizeLandscape = new Size(/*width*/1024, /*height*/ 768);
          var viewportSizePortrait = new Size(/*width*/500, /*height*/ 900);
          IWebDriver innerDriver = new ChromeDriver();
  
          if (!changeTest) 
          {
              Test01(innerDriver, eyes, viewportSizeLandscape);
              Test01Changed(innerDriver, eyes, viewportSizePortrait);
          } 
          else 
          {
              Test01Changed(innerDriver, eyes, viewportSizeLandscape);
              Test01Changed(innerDriver, eyes, viewportSizePortrait);
          }
          innerDriver.Quit();
      }
  
  
      private static void Test01(IWebDriver innerDriver, Eyes eyes, Size viewportSize) 
      {
          // Start the test and set the browser's viewport size
          IWebDriver driver = eyes.Open(innerDriver, appName, testName, viewportSize);
          try 
          {
              driver.Url = weburl;
              eyes.CheckWindow(&quot;Before enter name&quot;);                 // Visual checkpoint 1
  
              driver.FindElement(By.Id(&quot;name&quot;)).SendKeys(&quot;My Name&quot;); //enter the name
              eyes.CheckWindow(&quot;After enter name&quot;);                  // Visual checkpoint 2
  
              driver.FindElement(By.TagName(&quot;button&quot;)).Click();      // Click the  button
              eyes.CheckWindow(&quot;After Click&quot;);                       // Visual checkpoint 3
  
              Applitools.TestResults result = eyes.Close(false);     //false means don't thow exception for failed tests
              HandleResult(result);
          } 
          catch (Exception ex)
          {
              Console.WriteLine(ex);
          } 
          finally 
          {
              eyes.AbortIfNotClosed();
          }
      }
                
  
      private static void HandleResult(TestResults result) 
      {
          string resultStr;
          string url = result.Url;
          if (result == null) 
          {
              resultStr = &quot;Test aborted&quot;;
              url = &quot;undefined&quot;;
          } 
          else 
          {
              url = result.Url;
              int totalSteps = result.Steps;
              if (result.IsNew) 
              {
                  resultStr = &quot;New Baseline Created: &quot; + totalSteps + &quot; steps&quot;;
              } 
              else if (result.IsPassed) 
              {
                  resultStr = &quot;All steps passed:     &quot; + totalSteps + &quot; steps&quot;;
              } 
              else 
              {
                  resultStr = &quot;Test Failed     :     &quot; + totalSteps + &quot; steps&quot;;
                  resultStr += &quot; matches=&quot; +  result.Matches;      /*  matched the baseline */
                  resultStr += &quot; missing=&quot; + result.Missing;       /* missing in the test*/
                  resultStr += &quot; mismatches=&quot; + result.Mismatches; /* did not match the baseline */
              }
          }
          resultStr += &quot;\n&quot; + &quot;results at &quot; + url;
          Console.WriteLine(resultStr);
      }
  
       private static void Test01Changed(IWebDriver innerDriver, Eyes eyes, Size viewportSize) 
      {
          // Start the test and set the browser's viewport size
          IWebDriver driver = eyes.Open(innerDriver, appName, testName, viewportSize);
          try 
          {
              string webUrlToUse = weburl;
              if (changeTest) 
              {
                  webUrlToUse += &quot;?diff2&quot;;
              } 
              driver.Url = webUrlToUse;
              if (!changeTest) 
              {  
                  eyes.CheckWindow(&quot;Before enter name&quot;);             // Visual checkpoint 1
              }
              driver.FindElement(By.Id(&quot;name&quot;)).SendKeys(&quot;My Name&quot;); //enter the name
              eyes.CheckWindow(&quot;After enter name&quot;);                  // Visual checkpoint 2
  
              driver.FindElement(By.TagName(&quot;button&quot;)).Click();      // Click the  button
              eyes.CheckWindow(&quot;After click&quot;);                       // Visual checkpoint 3
  
              if (changeTest) 
              {  
                  eyes.CheckWindow(&quot;After click again&quot;);             // Visual checkpoint 3
              }
              TestResults result = eyes.Close(false); //false means don't thow exception for failed tests
              HandleResult(result);
          } 
          catch (Exception ex)
          {
              Console.WriteLine(ex);
          } 
          finally 
          {
              eyes.AbortIfNotClosed();
          }
      }
  
      private static void setup(Eyes eyes) 
      {
          eyes.ApiKey = Environment.GetEnvironmentVariable(&quot;APPLITOOLS_API_KEY&quot;);
          if (runAsBatch)
          {
              var batchInfo = new Applitools.BatchInfo(&quot;Hello World 2 Batch&quot;);
              eyes.Batch = batchInfo;
          }
          //eliminate artifacts caused by a blinking cursor - on by default in latest SDK
          eyes.IgnoreCaret = true;
      }
  }
  }
  </code></pre>