dotnet / linker

388 stars 126 forks source link

IL2121 being added needlessly to NoWarn and causing compiler errors on older netfx projects #3118

Open nbevans opened 1 year ago

nbevans commented 1 year ago

... because older compilers don't understand a NoWarn of "IL2121" e.g. older F# and WebSharper projects.

The workaround is to add to your project MSBuild file:

<PropertyGroup>
   <_TrimmerShowRedundantSuppressions>true</_TrimmerShowRedundantSuppressions>
</PropertyGroup>

But really this NoWarn modification shouldn't be happening at all on projects that aren't using the Linker:

image
marek-safar commented 1 year ago

This looks like SDK integration issues.

/cc @sbomer