0

If the same issue was posted here 5 months ago and did not get any answers, would it even make sense to post it again?

  • Nothing comes easy for that kind of issues, as they involve too many files and configuration settings. Start a new project and see if it works, and then migrate useful pieces from the old project to this new one. – Lex Li Nov 26 '21 at 13:33
  • please post more details information about your requirement, Otherwise, it is difficult for us to troubleshoot your problem, such as what project did you create? What did you do? – samwu Nov 29 '21 at 02:03

5 Answers5

2

If you're using .net core (or .net 5), in your .csproj file, make sure the Project property is <Project Sdk="Microsoft.NET.Sdk.Web"> and not <Project Sdk="Microsoft.NET.Sdk">.

Nadav
  • 21
  • 2
2

You need to open Visual Studio Installer and click on modify for "Visual Studio 2019", then in the Web Development, Make sure to check "Development Time IIS Support" Like the image below:

This should fix your problem.

enter image description here

0

Recreating the project from scratch resolved the issue.

0

Double check your startup project - when I had this issue it turns out I'd inadvertently switched it to the test project.

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Mikustykus
  • 300
  • 7
  • 16
0

Remove your project from the Solution and add again. It will solve your problem.

Ngu Wah Kyaw
  • 25
  • 1
  • 5