-
-
Notifications
You must be signed in to change notification settings - Fork 49
Description
@RickStrahl Here is a similar issue to #18
Severity Code Description Project File Line Suppression State
Error NU1107 Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 4.6.0 directly to project OPG.VIIC.Web.Core to resolve this issue.
OPG.VIIC.Web.Core -> Westwind.Scripting 1.3.3 -> Microsoft.CodeAnalysis.Scripting.Common 4.6.0 -> Microsoft.CodeAnalysis.Common (= 4.6.0)
OPG.VIIC.Web.Core -> Microsoft.EntityFrameworkCore.Tools 8.0.0 -> Microsoft.EntityFrameworkCore.Design 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces 4.5.0 -> Microsoft.CodeAnalysis.Common (= 4.5.0). OPG.VIIC.Web.Core C:\TFS\Intranet\OPG.VIIC.Web.Core\OPG.VIIC.Web.Core.csproj 1
Trying to upgrade to .NET Core 8.0 and the corresponding EF packages. There is a conflict now with Microsoft.EntityFrameworkCore.Tools 8.0.0 which uses Microsoft.CodeAnalysis.Common 4.5.0, but your package uses Microsoft.CodeAnalysis.Scripting.Common 4.6.0.
I kinda wonder if separate build profiles for different versions of .NET would fix this? For instance if you are targeting .NET Core 8.0, then the assumption being is you would use .NET 8.0 packages for things like Microsoft.EntityFrameworkCore.Tools which seem to use Microsoft.CodeAnalysis.Common 4.5.0 (instead of the later 4.6.0)?
In legacy .NET framework, we had this mapping functionality you could do in the web.config:
<dependentAssembly>
<assemblyIdentity name="Antlr3.Runtime" publicKeyToken="eb42632606e9261f" culture="neutral"/>
<bindingRedirect oldVersion="0.0.0.0-3.5.0.2" newVersion="3.5.0.2"/>
</dependentAssembly>In the above example it would cast any references from Antlr3.Runtime from versions 0.0.0.0 to 3.5.0.2 to 3.5.0.2 assembly version.
I tried adding this to my .NET 8.0 application .csproj, but it didn't help:
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>