Microsoft.CodeAnalysis.* issues again

2 Answers 618 Views
General Discussions
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
DoomerDGR8 asked on 07 Dec 2023, 09:32 AM | edited on 07 Dec 2023, 10:05 AM

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?

DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
commented on 07 Dec 2023, 09:41 AM | edited

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:


Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.Common (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.Common 4.8.0 was resolved

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.CSharp (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.CSharp 4.8.0 was resolved

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.CSharp.Workspaces (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.CSharp.Workspaces 4.8.0 was resolved.

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.CSharp.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.Workspaces.Common (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.Workspaces.Common 4.8.0 was resolved.

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.Common (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.Common 4.8.0 was resolved.

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Features 4.8.0-3.final requires Microsoft.CodeAnalysis.Workspaces.Common (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.Workspaces.Common 4.8.0 was resolved.

Detected package version outside of dependency constraint: Microsoft.CodeAnalysis.Scripting.Common 4.8.0-3.final requires Microsoft.CodeAnalysis.Common (= 4.8.0-3.final) but version Microsoft.CodeAnalysis.Common 4.8.0 was resolved.
 
Nikolay
Top achievements
Rank 1
Iron
commented on 08 Dec 2023, 03:57 PM | edited

.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
commented on 08 Dec 2023, 06:08 PM

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>

 

JeffVisibilEDI
Top achievements
Rank 1
Iron
commented on 09 Jan 2024, 12:09 AM

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.

Alexander
Telerik team
commented on 09 Jan 2024, 03:40 PM

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.

2 Answers, 1 is accepted

Sort by
0
Nikolay
Top achievements
Rank 1
Iron
answered on 08 Dec 2023, 03:57 PM
I am having the same issue when updating to the latest KendoUI version (2023.3.1114). Updating to the internal build (2023.3.1129) doesn't help either.
0
Alexander
Telerik team
answered on 11 Dec 2023, 04:15 PM

Hello,

A similar subject has been discussed in the following forum thread that goes more into detail, accompanied by a standalone Telerik UI for ASP.NET Core sample with ".NET8" as a target framework and the "Microsoft.EntityFrameworkCore.Tools" dependency:

To be frank, we are currently in the process of considering whether we can proceed with an effort of bumping the "CodeAnalysis" dependency on our side. To give you more context we have stalled this process since the library currently supports prior .NET Core incarnations.

Clients or corporations that depend on prior .NET Core frameworks that are supported (for example 3.1), would inevitably have to migrate their dependencies which may prove intangible - given their infrastructure.

However, we are currently striving to follow Microsoft's strategy when it comes to the support of ''LTS", "STS"  packages. I am personally taking on the responsibility of keeping this thread posted. In order for the community to be familiar when our migrational efforts are initiated.

To sum up, at this stage, the majority of the packages you have outlined are external and we depend indirectly on them. Hence, you should be able to update the respective versions as illustrated in the aforementioned forum thread.

I hope this helps.

Kind Regards,
Alexander
Progress Telerik

Stay tuned by visiting our public roadmap and feedback portal pages. If you're new to the Telerik family, be sure to check out our getting started resources, as well as the only REPL playground for creating, saving, running, and sharing server-side code.
Justin
Top achievements
Rank 1
commented on 11 Feb 2024, 06:46 PM

Has any progress been made on this? We are using the latest .NET and the latest ASP.NET Identity and it is causing an irreconcilable conflict. We have been waiting for a solution to this since November.

This has brought the admin portion of our project to a halt for months and is making us regret using Telerik.

I understand wanting legacy support but perhaps splitting the builds and creating a .NET 8 package is in order. I believe most of us are trying to stay on the latest .NET to avoid the costs of later migration.

I will open a ticket, although I don't know what can be done until Telerik decides to address this.

Alexander
Telerik team
commented on 12 Feb 2024, 08:03 AM

Hi Justin,

I'm happy to let you know that our developer subject matter experts have embarked on the task of omitting older .NET Core versions and dependencies as well.

As mentioned previously, the team has concluded that we should align with Microsoft’s recommended framework versions so that our products leverage the latest advancements in technology, security, and performance. 

To be more specific, this change is scheduled for the next 2024 Q2 release and will support applications targeting .NET 6 and above, as mentioned in our latest release notes:

Dan
Top achievements
Rank 1
commented on 17 Apr 2024, 04:32 PM

Any timeline for the Q2 release. This is really eating our lunch right now. Thanks!
Alexander
Telerik team
commented on 19 Apr 2024, 06:37 PM

Hi Dan,

The Q2 release is scheduled to come to light around the middle of May. However, once I have further confirmation regarding the exact date, I will update this thread with more information. In order to keep you guys posted - should there be any alterations.

Tags
General Discussions
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Nikolay
Top achievements
Rank 1
Iron
Alexander
Telerik team
Share this question
or