Unplanned
Last Updated: 17 Nov 2023 07:44 by ADMIN
Mike Butler
Created on: 01 Mar 2023 10:25
Category: UI for ASP.NET Core
Type: Feature Request
7
Version conflict detected when trying to install Microsoft.VisualStudio.Web.CodeGeneration.Design package

When trying to install Microsoft.VisualStudio.Web.CodeGeneration.Design 7.0.4 NuGet package in a Telerik UI for ASP.NET Core 2022.3.1109 application, it throws an exception:

NU1107: Version conflict detected for Microsoft.CodeAnalysis.CSharp.Workspaces. Install/reference Microsoft.CodeAnalysis.CSharp.Workspaces 4.4.0 directly to 
project TelerikAspNetCoreApp3 to resolve this issue. 

### Reproduction of the problem

1) Create a Telerik UI for ASP.NET Core 2022.3.1109 application (.NET 7.0).

2) Install Microsoft.VisualStudio.Web.CodeGeneration.Design NuGet package (version 7.0.4).

3) Review the NuGet Error in the output.

### Workaround

Install the the following NuGet packages:

  • Microsoft.CodeAnalysis.Common
  • Microsoft.CodeAnalysis.Workspaces.Common
  • Microsoft.CodeAnalysis.CSharp
  • Microsoft.CodeAnalysis.CSharp.Workspaces
  • Microsoft.CodeAnalysis.VisualBasic
  • Microsoft.CodeAnalysis.VisualBasic.Workspaces

Alternatively, install an older version of the Microsoft.VisualStudio.Web.CodeGeneration.Design package.

### Environment

* **Telerik UI for ASP.NET Core version: 2022.3.1109
* **.NET version: 7

7 comments
ADMIN
Aleksandar
Posted on: 17 Nov 2023 07:44

Hello Yi,

Adding the "Microsoft.CodeAnalysis" package with the desired version as an application dependency will resolve the issue. The Telerik UI for ASP.NET Core requires version 4.4.0 or higher.

Attached is a sample .NET8 application, using Telerik UI for ASP.NET Core version: 2023.3.1114. Iv added a dependency to Microsoft.CodeAnalysis and EF Core 8 to demonstrate how you could reference these packages:

I hope this helps.

Regards,
Aleksandar
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.
Attached Files:
Yi
Posted on: 16 Nov 2023 21:22

I am having the same issue.

  • Telerik UI for ASP.NET Core version: 2023.3.1114
  • .NET version: 8.0.0
  • Visual Studio 2022: 17.8.0
Ramarao
Posted on: 14 Jun 2023 13:50

Thanks Alexander. Yes, I ended up downgrading to 4.4 which was a hassle. In my case, the reason why VS was erroring out to downgrade from 4.5 to 4.4, for which I had opened a ticket and closed it eventually, was because of another .dll project which had the 4.5 reference. The error was not apparent and so, I had to spend some time.

 

But this is good to know. Thanks.

ADMIN
Alexander
Posted on: 14 Jun 2023 12:24

Hi Ramarao,

Recently we have embarked on an effort in bumping the "Microsoft.CodeAnalysis" version to "4.4.0". However, bumping the dependency again to the latest stable version would prove more intricate on our side.

As our online available demos rely on the "Microsoft.VisualStudio.Web.CodeGeneration.Design" which includes the Microsoft.DotNet.Scaffolding.Shared which in actuality still relies on the "4.4.0" CodeAnalysis dependency - resulting in the following error if we opt to again migrate the versions:

However for individual projects adding the latest stable "4.6.0" all-in-one CodeAnalysis library similarly to how it was illustrated previously, should not oppose further errors.

I hope this information helps.

Kind Regards,
Alexander
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Ramarao
Posted on: 07 Jun 2023 14:58

Hello All,

 

I am stuck because of this error and I am just unable to proceed and use any of the controls. Any updates on this?

 

Telerek is asking me to downgrade to 4.4 version of Microsoft.CodAnalysis. But VS is not allowing me to downgrade . Can ypu please upgrade the components to use latest version of Microsoft.CodeAnalysis, as I am stuck now.

ADMIN
Alexander
Posted on: 23 Mar 2023 17:06

Hi,

Generally, the Telerik UI library is compatible with .NET 7.0. Thus, to omit the error, a possible recommendation would be to install the all-in-one NuGet package Microsoft.CodeAnalysis instead:

This would produce the following result within the Telerik UI for ASP.NET Core dependencies:

With that in mind, other clients have reported a similar issue as the one described. Thus, I will forward this feedback additionally to our subject matter experts and explore the option of bumping the version of the CodeAnalysis dependency.

Kind Regards,
Alexander
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

DoomerDGR8
Posted on: 17 Mar 2023 05:52

I can confirm issue exists with the following newer versions:

  • Telerik UI for ASP.NET Core version: 2023.1.314
  • .NET version: 7.0.4
  • Visual Studio 2022: 17.6.0.Preview 2