jaredpar / basic-reference-assemblies

Produce NuPkg files that have .NET Reference assemblies as resources
MIT License
100 stars 15 forks source link

Compilation warnings when mixing assemblies prebuilt and built at runtime #7

Open belkiss opened 3 years ago

belkiss commented 3 years ago

Hello!

I'm using net5, and I'm trying to compile some c# code at runtime that depends on assemblies prebuilt from the cmd line with msbuild.

It works great, but I'm getting some warnings along the lines of:

warning CS1701: Assuming assembly reference 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' used by 'Sharpmake.CustomPlugin' matches identity 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' of 'System.Runtime', you may need to supply runtime policy

I'm not very familiar with the net5 toolchain intricacies yet, but I noticed that in C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\5.0.0\data there's a PackageOverrides.txt that indicates some version overrides, like System.Runtime|4.3.0.

Could that be related? And should those overrides be handled by basic-reference-assemblies?

Apologies if it's out of the scope of this repo.

Thanks!