ShevaKadu
Visual Studio has dementia
I was working on a WPF project, then I closed Visual Studio.
When I opened Visual Studio again, it showed me 10 incorrect errors, which all were
The name ... does not exist in the current context.
.
This happened by itself, I did not break anything.
Trying to build with the code-behind tabs open fails but works if I close them.10 replies
✅ HTTPClient's GetAsync errors and doesn't get caught
In this code
client
is a Httpclient
which is supposed to timeout after a delay.
To test that, I tried getting it to access a URL that doesn't work.
client.GetAsync(
).Result
throws a TaskCancelledException
, which doesn't get caught
Adding:
This function is supposed to be used in multiple threads. Maybe having the thread error out and shutdown serve as a "catch" block of sorts can work? However that is not optimalHow fix???:kekw:
52 replies