简体   繁体   English

Package 'Microsoft.AspNet.Mvc 5.2.9' 已使用 .NetFramework 恢复,版本 = v4.6.1,而不是项目目标框架

[英]Package 'Microsoft.AspNet.Mvc 5.2.9 ' was restored using .NetFramework, Version=v4.6.1, instead of the project target framework

I have an ASP.NET Core 6.0 MVC project.我有一个 ASP.NET Core 6.0 MVC 项目。 I'm trying to add this dll Microsoft.AspNet.Mvc 5.2.9 but I'm getting this below error.我正在尝试添加此 dll Microsoft.AspNet.Mvc 5.2.9但出现以下错误。 Please refer to this screenshot:请参考这个截图:

enter image description here在此处输入图像描述

We are migrating from ASP.NET MVC 5 to ASP.NET Core 6.0 in Visual Studio 2022 (version 17.4.2)我们正在 Visual Studio 2022(版本 17.4.2)中从 ASP.NET MVC 5 迁移到 ASP.NET Core 6.0

I'm expecting System.Web.Mvc should be added to my project.我期待System.Web.Mvc应该添加到我的项目中。

Thanks Regards Krishna谢谢 问候 克里希纳

You can generate some dummy ASP.NET MVC Core 6 project with VS2022, and take from its.csproj file, dependencies on MVC NuGet packages.您可以使用 VS2022 生成一些虚拟 ASP.NET MVC Core 6 项目,并从其 .csproj 文件中获取对 MVC NuGet 包的依赖项。 That way you are sure it has correct boilerplate code.这样你就可以确定它有正确的样板代码。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Package 'Microsoft.AspNet.Mvc 5.2.7' 已使用 '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, - Package 'Microsoft.AspNet.Mvc 5.2.7' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, 使用'.NETFramework,Version = v4.6.1'而不是项目目标框架'.NETCoreApp,Version = v2.0'恢复了包'EntityFramework 6.2.0' - Package 'EntityFramework 6.2.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.0' 警告NU1701:使用'.NETFramework,V ersion = v4.6.1'而不是项目目标框架恢复了软件包'System.Linq.Queryable 4.0.1' - warning NU1701: Package 'System.Linq.Queryable 4.0.1' was restored using '.NETFramework,V ersion=v4.6.1' instead of the project target framework 使用.netFramework版本4.6.1而不是项目目标框架.NETStandard v2.0还原了EF6.2 - EF6.2 was restored using .netFramework version 4.6.1 instead of the project target framework .NETStandard v2.0 无法解析目标框架“.NETFramework,Version=v4.6.1”的 mscorlib - Could not resolve mscorlib for target framework '.NETFramework,Version=v4.6.1' 如何修复`您的项目未引用“.NETFramework,Version=v4.6.1”框架...` - How to fix `Your project does not reference ".NETFramework,Version=v4.6.1" framework...` .net Core 2.0 - 使用 .NetFramework 4.6.1 而不是目标框架 .netCore 2.0 来恢复包。 软件包可能不完全兼容 - .net Core 2.0 - Package was restored using .NetFramework 4.6.1 instead of target framework .netCore 2.0. The package may not be fully compatible Nuget 包管理器项目失败,无法找到包“Microsoft.AspNet.Mvc”的 5.2.6 版 - Nuget package manager failed for project, Unable to find version 5.2.6 of package ‘Microsoft.AspNet.Mvc Centos .netcore找不到框架“ .NETFramework,Version = v4.6.1”的参考程序集 - Centos .netcore The reference assemblies for framework “.NETFramework, Version=v4.6.1” were not found 尝试安装针对.NETFramework V4.6.1 WPF的软件包 - Trying to Install Package that Targets .NETFramework V4.6.1 WPF
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM