Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Behavior change from .NET Core SDK 3.0.101 to 3.1.100 when generating MenuItems in WPF #2404
I write a WPF app targeting .NET Framework 4.7.2 and added a
In this app I define a menu of
After I switched the SDK version in
I created a super-simple example-app that reproduces this issue. It can be found in this GitHub repo alongside with screenshots of the issue.
After checkout you can build and run this project in VS16.5 and it will behave as (I) expect it. Then you can change the SDK version in global.json to 3.1.100 and rebuild it in VS. When you run it now, you will see the unexpected result.
On a side note: When running dotnet clean/run from the console, the unexpected behavior always occurs, regardless of the SDK version defined in
Also, I am not 100% sure whether this is the right place to post this issue. If there is a place better suited for my issue, please let me know and I will move this issue.
some additional information: When compiled with SDK version 3.0.101 the compiler adds the following
When compiled with SDK 3.1.100 (or using
(I checked my decompiled assembly for differences)
As a workaround, I tried to add the correct
I have the same issue targeting NET472.
Compiling the Project with the Legacy Project Format targeting 4.7.2 NET Framework
Converting the Project to the new Project Format targeting 4.7.2 NET Framework with .NET Core SDK 3.1.100