gpt4 book ai didi

asp.net-core - 检测到 Microsoft.CodeAnalysis.Common 的版本冲突。直接从项目中引用包来解决此问题

转载 作者:行者123 更新时间:2023-12-02 07:20:46 32 4
gpt4 key购买 nike

我想通过 Nuget 包管理器在我的 asp.net core 应用程序中添加 FluentValidation Nuget 包。添加时出现此错误:

Severity Code Description Project File Line Suppression State Error Version conflict detected for Microsoft.CodeAnalysis.Common. Reference the package directly from the project to resolve this issue. Project Name -> FluentValidation.AspNetCore 7.6.103 -> Microsoft.AspNetCore.Mvc 2.1.0 -> Microsoft.AspNetCore.Mvc.TagHelpers 2.1.0 -> Microsoft.AspNetCore.Mvc.Razor 2.1.0 -> Microsoft.CodeAnalysis.Razor 2.1.0 -> Microsoft.CodeAnalysis.Common (>= 2.8.0) Project Name -> Microsoft.VisualStudio.Web.CodeGeneration.Design 2.0.0 -> Microsoft.VisualStudio.Web.CodeGenerators.Mvc 2.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration 2.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.EntityFrameworkCore 2.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Core 2.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Templating 2.0.0 -> Microsoft.VisualStudio.Web.CodeGeneration.Utils 2.0.0 -> Microsoft.CodeAnalysis.CSharp.Workspaces 2.3.1 -> Microsoft.CodeAnalysis.Workspaces.Common 2.3.1 -> Microsoft.CodeAnalysis.Common (= 2.3.1).

如何解决这个错误?

最佳答案

我遇到了同样的问题,正在升级到 2.1,但由于某种原因,我需要手动将 Microsoft.CodeAnalysis.Common 包从 2.8.0 升级到 2.8.2

Install-Package Microsoft.CodeAnalysis.Common -Version 2.8.2

关于asp.net-core - 检测到 Microsoft.CodeAnalysis.Common 的版本冲突。直接从项目中引用包来解决此问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50930213/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com