Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c#

asp.net

iis

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?

like image 529
Rob Lyndon Avatar asked Nov 20 '14 10:11

Rob Lyndon


People also ask

How do I repair IIS Express?

Open the control panel and try to uninstall IIS express first. Then download IIS Express from this link. If it still cannot work, please open visual studio installer and repair it. VS will reset all environment path and variables.


1 Answers

The way I found to make it work was by looking for the <ProjectExtensions/> tag and replacing it with:

  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <UseCustomServer>True</UseCustomServer>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
like image 73
Pablo Montilla Avatar answered Sep 30 '22 05:09

Pablo Montilla