Open CreateAndInject opened 1 year ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
What error do you get?
class Test1
is not a part of net5-windows output, but it should be
@CyrusNajmabadi Can you reproduce this bug?
I don't think this is a Roslyn issue. I looked at how dotnet/sdk generates symbols for implicit DefineConstants
, and the root cause for this issue is that .NET Core 2.0 isn't in SupportedNETCoreAppTargetFramework
when building against netcoreapp3.0-windows
:
I can't track down this further, but I think investigation should start at dotnet/sdk, and they can move the issue appropriately after investigation.
I could track this down. The bug is caused by this:
dotnet/wpf removes few TFMs from SupportedNETCoreAppTargetFramework
(including .NET Core 2.0), which then affects <DefineConstants>
This was done intentionally, but the fact that this affects DefineConstants
seems like an unintended consequence.
This might require work on both dotnet/sdk and dotnet/wpf.
@marcpopMSFT @dsplaisted this is another instance of the 'supported TFMs should be different from known TFMs' problem that we were looking at in that other bug last week. We should have a way to treat these two lists distinctly.
Compiler doesn't compile
Test1
when targeting net5-windows (>=.NETCore3)I know .NETCore2.1 doesn't support WinForms, so I already add
#if
to prevent .NETCore2.1 compile WinForms codes