Strange Async Warning in VS 2013

2019-09-06 00:23发布

I have a Button on a UserControl.

I'm marking the UserControl's Click event handler for the Button as Async, so I can run an asynchronous method from inside it. I have to do it this way, otherwise the UI blocks and a ToolStripLabel on the Form doesn't get updated before the SchedulerNode.Load() method is called.

Visual Studio isn't liking it very much, but the warning it's returning seems both incorrect and misapplied.

Here's the code:

enter image description here

And here's the warning:

enter image description here

Note that VS indicates the correct line number but the wrong file (the designer code). And according to the warning I should make it an Async Sub... but it already is.

It looks like this may be a bug in the IDE. Can anyone else confirm?

0条回答
登录 后发表回答