简体   繁体   中英

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. I am trying to add new scaffolded item which is a MVC area.

But I keep getting an error.

  • Here is link to GitHub: click

Here are 2 relevant screenshots:

在此处输入图像描述

在此处输入图像描述

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). Package System.Threading 4.3.0 supports: monoandroid10 (MonoAndroid,Version=v1.0)

After downloaded your project. I add this line

.AddRazorRuntimeCompilation();

in Program.cs file. And I also install the Packages like yours, and It works fine.

My test steps

  1. Delete .vs , bin , obj folder.

  2. Open the project

  3. Install the packages

    在此处输入图像描述

  4. Run the app, and works fine

Suggestion

  1. Delete the 3 folder mentioned above.

  2. Upgrade your vs2022 to the lastest version

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM