RazorEngineCore
RazorEngineCore copied to clipboard
NU1107 - Version conflict detected for Microsoft.CodeAnalysis.CSharp.
In my solution, the RazorEngineCore package is installed on a project referenced by a Web API project.
I get this error:
NU1107 Version conflict detected for Microsoft.CodeAnalysis.CSharp. Install/reference Microsoft.CodeAnalysis.CSharp 4.8.0 directly to project ICD.ChronicKidneyDisease.Api to resolve this issue. MySolution.Api -> MySolution.HtmlGeneratorAdapter -> RazorEngineCore 2024.4.1 -> Microsoft.CodeAnalysis.CSharp (>= 4.8.0) MySolution.Api -> Microsoft.VisualStudio.Web.CodeGeneration.Design 8.0.0 -> Microsoft.DotNet.Scaffolding.Shared 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Features 4.8.0-3.final -> Microsoft.CodeAnalysis.CSharp (= 4.8.0-3.final).
I added the following line to the API project file but still got the above error.
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" />
Any idea how to fix it?