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 an MVC Area. But I keep getting an error.
- Here is link to GitHub for this project: 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)
Solution 1:
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
-
Delete
.vs
,bin
,obj
folder. -
Open the project
-
Install the packages
-
Run the app, and works fine
Suggestion
-
Delete the 3 folder mentioned above.
-
Upgrade your vs2022 to the lastest version