Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2015 can't start IIS Express

When I am trying to run an ASP.Net Core project in Visual Studio 2015, a Microsoft Visual Studio dialog appears "The project doesn't know how to run the profile IIS Express".

Does anyone know anything about this message, or how to fix it? I've searched Google and the MSDN. There's nothing in the build logs, or the Windows event log.

Microsoft Visual Studio: The project doesn't know how to run the profile IIS Express.

like image 694
ovasylenko Avatar asked Jun 01 '16 12:06

ovasylenko


People also ask

How do I enable IIS Express in Visual Studio?

Configure IIS express on visual studioSelect the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost.

How do I run IIS Express code in Visual Studio?

The VSCode command pallete is your friend. Press F1 on the keyboard and start typing IISExpress to see the list of commands to use.


2 Answers

This dialog showed up for me when I had migrated a project from dotnet RC1 to RC2.

Before the fix I could still run it using dotnet run and from Visual Studio choosing the profile other than "IIS Express".

I had misread this guide and forgot the .Web

\DNX\Microsoft.DNX.targets –> \DotNet.Web\Microsoft.DotNet.Web.targets

After fixing this and restarting Visual Studio(not sure if needed) I could run the project using the IIS Express profile.

Should also be noted that as per the comments, adding .Web in the top level node is required in the xproj. <Project Sdk="Microsoft.NET.Sdk"> should be <Project Sdk="Microsoft.NET.Sdk.Web">.

like image 172
hultqvist Avatar answered Sep 22 '22 09:09

hultqvist


In my case the issue was solved after added the ASP.NET and web development tool extension to my VS instalation.

enter image description here

like image 20
Antonio Reyes Avatar answered Sep 19 '22 09:09

Antonio Reyes