How to resolve Error NU1107 Version conflict detected for Microsoft.CodeAnalysis.Common?

Pooja Kesarkar 20 Reputation points
2023-04-19T09:40:47.5266667+00:00

-> I am getting this error as follows. NU1107 Version conflict detected for Microsoft.CodeAnalysis.Common. Install/reference Microsoft.CodeAnalysis.Common 3.8.0 directly to project Nexgen.Web to resolve this issue. User's image

->I tried adding the dependency, the error is still persistingUser's image

->Neither this project nor other project in solution is using Microsoft.CodeAnalysis.Common.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,622 questions
0 comments No comments
{count} votes

Accepted answer
  1. Chen Li - MSFT 1,221 Reputation points
    2023-04-20T02:28:28.1933333+00:00

    Hi @Pooja Kesarkar,

    In fact, there is also this interdependence between Nuget packages. You are getting this error because you are installing ReportViewerCore.NETCore.

    As you can see in the NuGet Package Manager, ReportViewerCore.NETCore needs to depend on Microsoft.CodeAnalysis.VisualBasic(>=3.6.0): User's image

    And Microsoft.CodeAnalysis.VisualBasic needs to depend on Microsoft.CodeAnalysis.Common: User's image

    As for why it is recommended that you install version 3.8.0 directly, because this version solves the dependency problem of Microsoft.CodeAnalysis.VisualBasic, you do not need to install Microsoft.CodeAnalysis.VisualBasic: User's image

    In fact, under your error message, it tells you some dependencies of the NuGet package you use, you may not notice: User's image

    The final flow points to you needing to install the Microsoft.CodeAnalysis.Common NuGet package. Install Microsoft.CodeAnalysis.Common 3.8.0 first, then ReportViewerCore.NETCore, as per the NuGet package shown in your screenshot, your error should disappear.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Chen Li

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.