Open tohidazizi opened 1 month ago
Hi, as a quick thought, I bet it has something to do with dependentAssembly. One of your project reference newer (or older) version of Microsoft.CodeAnalysis.CSharp
checklist:
usually this kind of runtime / assemblyBinding helps (this one is copy-paste from google with wrong version numbers)
<dependentAssembly>
<assemblyIdentity name="Microsoft.CodeAnalysis" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.9.9.9" newVersion="1.0.0.0" />
</dependentAssembly>
Hi, i am also facing this issue:
Severity Code Description Project File Line Suppression State Error (active) NU1107 Version conflict detected for Microsoft.CodeAnalysis.CSharp. Install/reference Microsoft.CodeAnalysis.CSharp 4.8.0 directly to project TJPA.PagamentoPrecatorios.API to resolve this issue. TJPA.PagamentoPrecatorios.API -> TJPA.PagamentoPrecatorios.Infrastructure.Reporting -> RazorEngineCore 2024.4.1 -> Microsoft.CodeAnalysis.CSharp (>= 4.8.0) TJPA.PagamentoPrecatorios.API -> Microsoft.EntityFrameworkCore.Design 8.0.8 -> Microsoft.CodeAnalysis.CSharp.Workspaces 4.5.0 -> Microsoft.CodeAnalysis.CSharp (= 4.5.0). TJPA.PagamentoPrecatorios.API D:\TJPA\precatorios\api-pagamento-precatorios\src\TJPA.PagamentoPrecatorios.API\TJPA.PagamentoPrecatorios.API.csproj 1
After installing the recommended package <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
i still had the erros. So i looked out in my assemblies deps:
So i installed <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" />
, and removed <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
and got it to work.
In my solution, the RazorEngineCore package is installed on a project referenced by a Web API project.
I get this error:
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?