Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568https://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

Edit: Ahem, so it turns out that Main cannot be async. So maybe for now just confirm that this method get's called properly until the end by blocking the thread.

 static void Main(string[] args) { Gettasks(); Console.ReadLine(); //just don't press enter immedietly :) } 

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

Edit: Ahem, so it turns out that Main cannot be async. So maybe for now just confirm that this method get's called properly until the end by blocking the thread.

 static void Main(string[] args) { Gettasks(); Console.ReadLine(); //just don't press enter immedietly :) } 

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. https://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

Edit: Ahem, so it turns out that Main cannot be async. So maybe for now just confirm that this method get's called properly until the end by blocking the thread.

 static void Main(string[] args) { Gettasks(); Console.ReadLine(); //just don't press enter immedietly :) } 
added 332 characters in body
Source Link

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

Edit: Ahem, so it turns out that Main cannot be async. So maybe for now just confirm that this method get's called properly until the end by blocking the thread.

 static void Main(string[] args) { Gettasks(); Console.ReadLine(); //just don't press enter immedietly :) } 

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); } 

Edit: Ahem, so it turns out that Main cannot be async. So maybe for now just confirm that this method get's called properly until the end by blocking the thread.

 static void Main(string[] args) { Gettasks(); Console.ReadLine(); //just don't press enter immedietly :) } 
Source Link

It's prematurely exiting the program since it doesn't wait for the end of the execution I guess. (see e.g. http://stackoverflow.com/a/15149840/5296568)

Change

public static async void Gettasks() 

To

public static async Task Gettasks() 

Then await the end of the execution.

 static async void Main(string[] args) { await Gettasks(); }