title: Error on my console application "Program does not contain a static 'Main' method suitable for an entry point"
body: <p>I want to run Parallel processing inside my asp.net console application. i am using c# 7.1 + Visual Studio 2017</p>
  
  <p>Here is my code:-</p>
  
  <pre><code> class Program
      {
          static int concurrentrequests = int.Parse(ConfigurationManager.AppSettings["ConcurrentRequests"]);
          static   SemaphoreSlim throttler = new SemaphoreSlim(initialCount: concurrentrequests);
          static int numberofrequests = int.Parse(ConfigurationManager.AppSettings["numberofrequests"].ToString());
          static  int waitduration = int.Parse(ConfigurationManager.AppSettings["waitdurationmilsc"].ToString());
          private static async Task&lt;ScanInfo&gt; gettingCustomerInfo(string website)
          {
              await throttler.WaitAsync();
              ScanInfo si = new ScanInfo();
              int counter = 1;
              try
              {
                  //code goes here..
                  Console.WriteLine(website + "    --&gt;     " + si.EmailGateway + "    --&gt;     " + si.Status);
  
              }
              catch (Exception e)
              {
  
              }
                  try
                  {
                      using (WebClient wc = new WebClient()) // call the PM API to get the account id 
                      {
                          //code goes here..
  
                      }
                  }
                  catch (Exception e)
                  {
  
  
  
                  }
                  //string pmtoken = tokenGet();
  
                  finally
                  {
  
                      throttler.Release();
                  }
  
              }
              return si;
          }
  
          static async Task Main(string[] args)
          {
              Marketing ipfd = new Marketing();
              try
              {
                  using (WebClient wc = new WebClient()) 
                  {
                      //code goes here..
  
                  }
              }
              catch (Exception e)
              {
  
  
              }
              var tasks = ipfd.companies.Select(c =&gt; gettingCustomerInfo(c.properties.website.value)).ToList();
              var results = await Task.WhenAll(tasks);
      }}
  </code></pre>
  
  <p>now in my above code, i am trying to call the <code>gettingcustomerinfo</code> in parallel manner. but my above code will raise the following error:-</p>
  
  <blockquote>
    <p>"Program does not contain a static 'Main' method suitable for an entry
    point"</p>
  </blockquote>
  
  <p>now if i use :-</p>
  
  <pre><code>static void Main(string[] args)
  </code></pre>
  
  <p>instead of :-</p>
  
  <pre><code>static async Task Main(string[] args)
  </code></pre>
  
  <p>i will get this error instead:-</p>
  
  <blockquote>
    <p>The 'await' operator can only be used within an async method. Consider
    marking this method with the 'async' modifier and changing its return
    type to 'Task'.</p>
  </blockquote>
  
  <p>on:-</p>
  
  <pre><code>var results = await Task.WhenAll(tasks);
  </code></pre>
  
  <p>so can anyone advice on this please?</p>