Skip to content

event handlers are not generated in top level programs. #58474

@AdmiralSnyder

Description

@AdmiralSnyder

Version Used:
17.1.0 Preview 1.1

Steps to Reproduce:

  1. create a new console application (.net 6)
  2. import a nuget package (NAudio in my case, but that doesn't matter)
  3. get a reference to an object having an event (an MMDevice in my case, but that doesn't matter either)
  4. try to let VS generate the event handler:
    let's say the variable name is myVariable, and the event is MyEvent:
myVariable.MyEvent +=

now, a tooltip tells you to hit the TAB key to generate the proper event handler
5. Hit the TAB key
6. observe that nothing happens

Expected Behavior:
a proper event handler should be generated
Actual Behavior:
nothing is generated.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions