So we have this recurring issue every time:
Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces. Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.8.0-3.final directly to project ProjectName to resolve this issue. ProjectName -> Microsoft.VisualStudio.Web.CodeGeneration.Design 8.0.0 -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 8.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 8.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (>= 4.8.0-3.final) ProjectName -> Telerik.UI.for.AspNet.Core 2023.3.1114 -> Microsoft.CodeAnalysis 4.4.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces (= 4.4.0).
Now, Microsoft.CodeAnalysis and all DLLs are at v4.8. I have just installed Microsoft.CodeAnalysis v4.8 but I am getting the above error (it's not a warning, but an error). This has happened a few times before. I keep adding numerous DLLs until the error becomes a persistent warning. Is there a more professional solution to this?
Here is what it takes to get only warnings:
<ItemGroup> <PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.8.0" /> </ItemGroup>
The error becomes 7 warnings:
Ultimately, thesèreferences solved the issue for me:
<ItemGroup> <PackageReference Include="Microsoft.CodeAnalysis" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Common" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Features" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Features" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Scripting.Common" Version="4.8.0" /> <PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.8.0" /> </ItemGroup>
Adding references to the Microsoft.CodeAnalysis packages is a workaround.
There is a discrepancy in the dependencies of the Telerik UI toolset for .NET Core vs .NET 8 itself. The Telerik toolset requests for Version 4.4 ONLY of the several packages, whereas .NET 8 specifies Version 4.8.
If the package references are not included, the solution cannot compile. If they are include, then each project within the solution that references these packages gives a "version incompatible" warning (but compiles and runs).
In my view, if Telerik states that their toolset is compatible with .NET 8 (or .NET7 for that matter - I had the same issues before I updated to V8!), then they need to set up the dependencies to be consistent. The Nuget tools say that these packages should not be referenced directly by projects. But yet they have to be referenced directly because of this problem.
Hi Jeffrey,
I personally understand your point of view, as it indeed makes complete sense in terms of providing a suite of components that is in strong symbiosis with Microsoft's strategies.
Due to recent reports, I am happy to let you know that we are already working toward migrating the dependencies and hopefully, this will not be necessary for our upcoming version.
We apologize once again for the inconvenience. Your feedback is invaluable to us and I assure you, it is not taken for granted.