If you want to give every developer the choice to use IIS Express or full IIS during development in Microsoft Visual Studio 2010 sp1, you can use a csproj.user file for you project. This file can be used to overwrite settings in the *.csproj file.

This file will by default not be added to TFS, so every developer can use it’s own configuration, without interfering with other developers.

First uncheck "Apply server settings to all users (store in project file)"

Then check "Use IIS Express" on the Web tab from the Microsoft Visual Studio 2010 sp1 project.

image

 

Change the generated *.csproj.user, like:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectView>ShowAllFiles</ProjectView>
    <UseIISExpress>true</UseIISExpress>
  </PropertyGroup>
  <ProjectExtensions>
    <VisualStudio>
      <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
        <WebProjectProperties>
          <StartPageUrl>Default.aspx</StartPageUrl>
          <StartAction>SpecificPage</StartAction>
          <AspNetDebugging>True</AspNetDebugging>
          <SilverlightDebugging>False</SilverlightDebugging>
          <NativeDebugging>False</NativeDebugging>
          <SQLDebugging>False</SQLDebugging>
          <ExternalProgram>
          </ExternalProgram>
          <StartExternalURL>
          </StartExternalURL>
          <StartCmdLineArguments>
          </StartCmdLineArguments>
          <StartWorkingDirectory>
          </StartWorkingDirectory>
          <EnableENC>False</EnableENC>
          <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
          <UseIIS>True</UseIIS>
          <AutoAssignPort>False</AutoAssignPort>
          <DevelopmentServerPort>1000</DevelopmentServerPort>
          <DevelopmentServerVPath>/Test</DevelopmentServerVPath>
          <IISUrl>http://localhost:1000/Test</IISUrl>
          <NTLMAuthentication>False</NTLMAuthentication>
          <UseCustomServer>False</UseCustomServer>
          <CustomServerUrl>
          </CustomServerUrl>
        </WebProjectProperties>
      </FlavorProperties>
    </VisualStudio>
  </ProjectExtensions>
</Project>

Now your build server can use the settings in the csproj file and you, as a developer, have the choice to use these settings or overwrite them with the *.csproj.user file.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.