[英]Unable to create Area in ASP.NET Core 6 MVC framework
I am working with a project where I am using ASP.NET Core 6 MVC.我正在处理一个使用 ASP.NET Core 6 MVC 的项目。 I am trying to add new scaffolded item which is a MVC area.
我正在尝试添加新的脚手架项目,它是一个 MVC 区域。
But I keep getting an error.但我不断收到错误消息。
Here are 2 relevant screenshots:这是2个相关的屏幕截图:
How can I solve this problem?我怎么解决这个问题?
Note: this may be an important factor for this problem:注意:这可能是导致此问题的重要因素:
Error NU1202 Package System.Threading 4.3.0 is not compatible with net6.0 (.NETCoreApp,Version=v6.0).
错误 NU1202 Package System.Threading 4.3.0 与 net6.0 (.NETCoreApp,Version=v6.0) 不兼容。 Package System.Threading 4.3.0 supports: monoandroid10 (MonoAndroid,Version=v1.0)
Package System.Threading 4.3.0 支持:monoandroid10 (MonoAndroid,Version=v1.0)
After downloaded your project.下载您的项目后。 I add this line
我添加了这一行
.AddRazorRuntimeCompilation();
in Program.cs
file.在
Program.cs
文件中。 And I also install the Packages like yours, and It works fine.而且我也安装了像你一样的包,它工作正常。
Delete .vs
, bin
, obj
folder.删除
.vs
、 bin
、 obj
文件夹。
Open the project打开项目
Install the packages安装软件包
Run the app, and works fine运行应用程序,工作正常
Delete the 3 folder mentioned above.删除上面提到的3个文件夹。
Upgrade your vs2022 to the lastest version将你的 vs2022 升级到最新版本
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.