try
try copied to clipboard
static async Task Main(string[] args)
Describe the bug
Pressing Run causes the page to lock-up
Did this error occur while using dotnet try
or online?
- [ ]
dotnet-try
- [X] online
What kind of error was it?
- [ ] User Interface (UI): For example the output never displayed
- [ ] Service Error: For example "The service is temporarily unavailable. We are working on it"
- [X] Other: screen locks up
Screenshots
If applicable, add screenshots to help explain your problem.
Please complete the following:
- OS
- [ ] Windows 10
- [X] Windows 7
- [ ] macOS
- [ ] Linux (Please specify distro)
- [ ] iOS
- [ ] Android
- Browser
- [X] Chrome
- [ ] Edge
- [ ] Safari
In the gist below the timer code was excluded when attempting to run code. https://gist.github.com/karenpayneoregon/ba2ed514e3c2025d72f4959454d7ef55
The following is a much simpler code that causes the same issue:
using System;
using System.Threading.Tasks;
public class Program
{
public static async Task Main()
{
Console.WriteLine("TEST");
await Task.Delay(500);
Console.WriteLine("TEST2");
}
}
Hello, I was simply trying code that works in Visual Studio to see if it worked online.
@karenpayneoregon , Yes, you're correct that there is a bug. I just provided a smaller code to be easier for the dotnet/try team to investigate it :)
Thank you :-)
It no longer blocks the page, but the continuation code after await
simply doesn't get invoked, e.g.:
https://try.dot.net/?bufferId=trydotnet.cs&fromGist=717d378bc9f14db1ed30d0e2e67b0534