.Net 8 compatibility

0 Answers 956 Views
Installer and VS Extensions
Lenny
Top achievements
Rank 1
Lenny asked on 14 Nov 2023, 07:37 PM
I noticed that if I attempt to add the .net core nuget package to a .net 8 project with entity framework core design package installed the add will fail as the Telerik package requires older libraries that the newer entity framework is not compatible with. The Telerik blog page indicates that the latest Telerik package is fully compatible with .net 8 and I dont believe that is accurate. Any idea when this will be fixed.
JG
Top achievements
Rank 2
Iron
commented on 15 Nov 2023, 12:28 PM | edited

We're also getting a similar issue using the Microsoft code analysis package; 

NU1107  Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces.
Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.4.0 directly to project
Lenny
Top achievements
Rank 1
commented on 15 Nov 2023, 01:42 PM

Looks like Telerik release an update to their nuget package. I am going to try the updated one
Lenny
Top achievements
Rank 1
commented on 15 Nov 2023, 01:52 PM

FYI the updated package has the same issue as the previous one. I opened a support ticket. Hopefully they will fix it soon.
Mike
Top achievements
Rank 1
Iron
commented on 15 Nov 2023, 06:02 PM | edited

Yes, I noticed that too this morning, however mine was about version 4.5, not 4.4.

Awaiting an update from Telerik on this issue.  I don't reference EF Core Design package, but I do have EF Core SqlServer and EF Core Tools (one of which may required the Design package).

I also tried directly referencing Microsoft.CodeAnalysis.CSharp.Workspaces 4.5.0 directly (as well as 4.7.0 - the latest available at the time of this post) and that still didn't work

Alexander
Telerik team
commented on 16 Nov 2023, 06:30 AM

Hi,

Since Lenny opened an identical thread regarding the same subject matter, I will post my answer here, so that it could be helpful to the community as well:

"Generally, the Telerik UI library is compatible with .NET 8.0. Thus, to omit the error, a possible recommendation would be to install the all-in-one NuGet package "Microsoft.CodeAnalysis" instead. This package can be perceived as an indirect dependency, thus, it can be altered as per your requirements:

This would override the existing package reference to "CodeAnalysis" within the Telerik UI for ASP.NET Core assembly:

I have purposefully created a proof-of-concept sample application that tackles the aforementioned approach, as well as including some of the newly released EntityFrameworkCore packages that require a latter version of the dependency."

I hope this helps.

 

Mike
Top achievements
Rank 1
Iron
commented on 16 Nov 2023, 06:57 PM

This doesn't seem to solve my issue.  I updated to the latest Telerik package (2023.3.1114 at time of comment) and bumped my projects to .NET 8.  I also added Microsoft.CodeAnalysis 4.5 (later updating it to 4.7) and it's still throwing the error

Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces. Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.8.0-3.final directly
I then added the package reference in the error (it's pre-release currently), and that still hasn't solved the issue.
Lenny
Top achievements
Rank 1
commented on 16 Nov 2023, 08:35 PM

Telerik has a hard reference to Microsoft.CodeAnalysis 4.4.0 which has the reference to Microsoft.CodeAnalysis.CSharp.Workspaces 4.4.0 

They will have to fix this before we can add Microsoft.EntityFramework.Tools package.

 

Mike
Top achievements
Rank 1
Iron
commented on 17 Nov 2023, 01:01 AM

I looked into what was using the Microsoft.EntityFramework.Tools package and was able to remove it.  After that, I am still not able to upgrade to .NET 8 - still getting the same error.  I guess I'll just have to wait until Telerik releases a .NET 8 compatible version.
Alexander
Telerik team
commented on 17 Nov 2023, 08:42 AM

I am again giving you a follow-up on a previous communication with Lenny:

In regard to the source code, we agree with you that we have added an explicit reference to "Code.Analysis 4.4.0". Since we have received a vast amount of reports these past days, we will diligently explore the option of migrating the existing package to a version that is supported by ".NET 8".

Nevertheless, I have further added the following set of packages to the existing project infrastructure:

However, I did not manage to observe a compile-time or a run-time error.

Additionally, CodeAnalysis has direct dependencies in which it comes with:

Thus, if both of the packages are explicitly referenced on your side, I would recommend omitting them. Additionally, try to clean and rebuild the project.

No answers yet. Maybe you can help?

Tags
Installer and VS Extensions
Asked by
Lenny
Top achievements
Rank 1
Share this question
or