title: How to stop Visual Studio 2017 from randomly switching projects to run in IIS Express when they're configured to run in Local IIS?
body: <p>Our team recently upgraded to Visual Studio 2017.  We store our server settings in the project file to use Local IIS, but opening up the properties of the project shows it to be using IIS Express.  This occurs seemingly at random and has been affecting random teammates ever since we upgraded.</p>
  
  <p><a href="https://i.stack.imgur.com/UL5NE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UL5NE.png" alt="IIS Express"></a></p>
  
  <p>The .csproj file in source control shows the following:</p>
  
  <pre><code>&lt;PropertyGroup&gt;
    ...
    &lt;UseIISExpress&gt;false&lt;/UseIISExpress&gt;
    &lt;IISExpressSSLPort /&gt;
    &lt;IISExpressAnonymousAuthentication /&gt;
    &lt;IISExpressWindowsAuthentication /&gt;
    &lt;IISExpressUseClassicPipelineMode /&gt;
    &lt;Use64BitIISExpress /&gt;
    ...
  &lt;/PropertyGroup&gt;
  </code></pre>
  
  <p>as well as:</p>
  
  <pre><code>&lt;ProjectExtensions&gt;
    &lt;VisualStudio&gt;
      &lt;FlavorProperties GUID="{...}"&gt;
        &lt;WebProjectProperties&gt;
          &lt;UseIIS&gt;True&lt;/UseIIS&gt;
          &lt;AutoAssignPort&gt;True&lt;/AutoAssignPort&gt;
          &lt;DevelopmentServerPort&gt;53703&lt;/DevelopmentServerPort&gt;
          &lt;DevelopmentServerVPath&gt;/&lt;/DevelopmentServerVPath&gt;
          &lt;IISUrl&gt;http://localhost/MyProject&lt;/IISUrl&gt;
          &lt;NTLMAuthentication&gt;False&lt;/NTLMAuthentication&gt;
          &lt;UseCustomServer&gt;False&lt;/UseCustomServer&gt;
          &lt;CustomServerUrl&gt;
          &lt;/CustomServerUrl&gt;
          &lt;SaveServerSettingsInUserFile&gt;False&lt;/SaveServerSettingsInUserFile&gt;
        &lt;/WebProjectProperties&gt;
      &lt;/FlavorProperties&gt;
    &lt;/VisualStudio&gt;
  &lt;/ProjectExtensions&gt;
  </code></pre>
  
  <p>When this occurs, it seems to randomly set <code>&lt;UseIIS&gt;True&lt;/UseIIS&gt;</code> to <code>False</code> and teammates are accidentally checking in this change when they don't catch it.  Is there a way to stop this from happening?</p>