Rob Lyndon Rob Lyndon - 18 days ago 10
ASP.NET (C#) Question

Can't open web project because IIS Express is not installed (even though it is)

I have recently changed machines at work, and a long-standing web project now refuses to open in Visual Studio.

The error log reads: "The Web project 'xxx' is configured to use IIS Express. You must download and install IIS Express in order to load this project."

However, IIS Express is installed on this machine (contrary to what the message is saying), and both the

UseIISExpress
and
UseIIS
options are set to false in the
csproj
file:

<UseIISExpress>False</UseIISExpress>
...
<UseIIS>False</UseIIS>


I have tried silly things, like switching between
false
and
False
, but so far to no avail. Is there anything else I can try?

Answer

In the absence of a request for a suitable web server in the csproj file, it defaults to its own best guess, which in this case happens to be IIS Express. So in this case, the answer was to change the UseIIS option to True, and the project opened correctly.

<UseIIS>True</UseIIS>