1

When I generate a dll in Roslyn referencing System.Private.CoreLib.dll it correctly errors when I try to reference it in a .NET Framework application. However when I inspect the dll using ILSpy the metadata information (below) is missing and ILSpy just defaults .NetFramework, v4.0.

[assembly: TargetFramework(".NETCoreApp,Version=v3.1", FrameworkDisplayName = "")]

The dll has been created correctly but the process seems to not specify the assembly metadata. Is there anyway to set this metadata when creating the dll using Roslyn? It also neglects to set things like AssemblyFileVersion, AssemblyTitle etc.

Edit

Found the answer here

David
  • 1,731
  • 24
  • 37
  • It would help a lot if you showed the code you're using to generate the DLL... but why would you expect Roslyn to automatically set this info anyway? – Ian Kemp Jan 26 '21 at 14:16

0 Answers0