Dynamically setting the IISUrl of a Web Application Project

后端 未结 3 1153
日久生厌
日久生厌 2021-02-07 13:13

I have a web application project that I\'d like to be able to branch and develop on a totally separate IIS site and not have to keep editing the vbproj IISUrl setting each time

3条回答
  •  盖世英雄少女心
    2021-02-07 13:39

    I believe I might have a workaround for this in VS2010.

    Right click on the project in VS2010 and go to Properties. In the Web tab, Uncheck the "Apply server settings to all users (store in project file)". What this does is forces all of the settings to be stored in a [Web Project Name].csproj.user file instead of in the project file itself. (Mine is a C# project instead of VB, but I assume it works the same) This allows you to have different server settings on each machine doing development, but at the same time share the rest of the configuration.

    I had to do this because I'm using SSL certificates on each development machine (workstation and laptop) so the Project URL is different, but I don't want to have to manually mess with the URL on each machine more than once and worry about it while checking my code into source control.

    Once you've done the initial configuration on a machine after getting the latest source, your .user file holds the configuration. So long as you're not checking .user files into source control this seems to work fine.

提交回复
热议问题