I have a couple of computers I work between for the samples I use on this blog and when switching to between of them I got the following error last week.
The project doesn’t know how to run the profile IIS Express.
I verified the project would still run on the other computer with no issues. I also verified that on the computer with the issues the project would still work using dotnet run from the command line still worked.
Next, I went to verify the project properties. Here I noticed a strange thing on the computer with the error the Debug tab of the project properties was missing a lot of setting. The following is a screen shot of the computer with the issues.
And here is the same tab on the same project, but from a different computer.
The cause
After more time that I would like to admit I was able to track down the issue. On the computer with the issue, I often work on projects that are very large which tend to slow down Visual Studio pretty bad. In an effort to speed things up a bit I when through and disabled all the extensions that I could including the Microsoft Azure App Service Tools. Turns out that disabling the previous extension caused the Microsft ASP.NET and Web Tools extension to be disabled as well (with no warning).
The solution
The only way I was able to get the project to work properly was to enable both the Microsft ASP.NET and Web Tools extension AND the Microsoft Azure App Service Tools extension. I am not sure why the Microsft ASP.NET and Web Tools extension need the Microsoft Azure App Service Tools extension but based on my experience they are related in some way.
Ty you saved my evening !
Glad to hear it!
Mine too! Thanks.
Glad it helped!
Hi! Where can I reenable Microsft ASP.NET and Web Tools extension AND the Microsoft Azure App Service Tools extension? I can’t seem to find it in VS2017. Thanks!
It should be in the Tools > Extensions and Updates which is the second option.
Hi,
I don’t see that extension in the list. Is there a way to reinstall that?
Sorry for the delayed response. You could try installing the SDK which can be found here. If you have that install try launching the Visual Studio 2017 installer and making sure you have “ASP.NET and web development” installed.
Hi Eric, I just want to add one more expression of thankfulness for your diligence and help for the community.
Thank you so much, Yuriy!
This is one of those times when being a performance nerd turned out to be a negative effect ?
I found a solution for the problem:
https://developercommunity.visualstudio.com/comments/160981/view.html
Is your project referencing the .NET web sdk? it should have a line like this at the top of the project file:
Good info. Thank you Pelice!
This is a right solution, thank you!
I’ll add my thanks to the list. Today this post saved my butt as well.
Glad to hear it!
I’m adding my thanks too! It worked for me too.
I couldn’t find the extensions easily in the dialog from Tools > Extensions and Updates so instead I went to Add or Remove programs in System Settings, scrolled down to Visual Studio Professional 2017 and clicked on the Modify button. Then it’s really easy to select the tools you want to add.
Thanks for information. It work for me.
Go to Tools>get tools and feature, install ASP.NET and web development
Glad it helped.
Fast forwarding to 2020, this is still being helpful! Thank you guys!
Fast forwarding to 2021, this is still being helpful! Thank you guys!