Question

Does anyone know a trick to change all web projects in a Visual Studio solution so that they use IIS Express.

Imagine converting 100 Web Application projects by clicking each "Properties"...

Was it helpful?

Solution 2

There is no easy way at the moment for converting a lot of projects. A PowerShell script would do the job but I didn't find one and I don't intend to write it the moment.

OTHER TIPS

You could edit the .csproj files directly, maybe do a find and replace on all of them. I'm sure there's a more elegant way.

Those settings are stored under:

<ProjectExtensions>
    <VisualStudio>
    <WebProjectProperties>
              <UseIIS>False</UseIIS>
              <AutoAssignPort>True</AutoAssignPort>
              <DevelopmentServerPort>56051</DevelopmentServerPort>
              <DevelopmentServerVPath>/</DevelopmentServerVPath>
              <IISUrl>
              </IISUrl>
              <NTLMAuthentication>False</NTLMAuthentication>
              <UseCustomServer>False</UseCustomServer>
              <CustomServerUrl>
              </CustomServerUrl>
              <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
            </WebProjectProperties>
     ...

Use a decent editor like notepad++ to do a "replace in files", then just do a global replace of <UseIIS>False</UseIIS> with <UseIIS>True</UseIIS> on all *.csproj and all *.csproj.user files in your directory tree.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top