I have Windows 10 and Visual Studio 2022 Community on this comp. I have .NET 7 installed.
I want to create a template ASP.NET application.
I run the Visual Studio and go to File→Add → Add project. I select “ASP.NET Core Web application”; then click Next:
The result is the following: Studio really creates the files, but they do not work; I just cannot open the project. For example, here is code of generated *.csproj file:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
</Project>
Any ideas about the problem?
2
Answers
MSFT
In response to the "You can edit the screenshots of your Visual Studio Installer without the repair option and the screenshots of you after executing "dotnet --info" into your post":
I have finally found the Repair option (my installer used a non-English language, this confused me). I have done the Repair; but the problem still ocurrs.
Aas for the "and the screenshots of you after executing "dotnet --info" into your post" - here it is:
Can the "No SDKs were found" be a root cause of the probkem?
It does seem like the SDK or something similar is corrupted, you can fix it with Visual Studio by:
Open Visual Studio Installer => Find the Visual Studio you are using => More => Repair
If it still doesn’t work, you can try reinstalling Visual Studio.
Finally, if this error still occurs after reinstalling Visual Studio, please open cmd and enter
dotnet --info