How to use IIS Express without polluting the .csproj file
-
26-10-2019 - |
Question
I recently switched to IIS Express for asp.net developement but I don't understand that clicking on "Use IIS Express..." (contextual menu on project in Visual Studio) affects the .csproj file...
The problem is when I commit changes (Source Control) I also commit the new IIS Express configuration and this is, in my opinion, a user preference configuration. Therefore it should be written in a .suo file (which is ignored by source control).
I understand this is more rambling than a question but I thought maybe someone would have a solution.
Solution
Unfortunately, these project settings are how VS can tell whether to use Cassini or IIS Express. However, you can choose to save the project server settings in the proj.user file, so that they will not be checked in to source control. Under project Properties -> Web, you can unselect the "Apply server settings to all users" option:
OTHER TIPS
Just an extra comment to the accepted answer... You may find it difficult for Visual Studio 2010 to accept that change as relevant for check-in and have it annoyingly ignore your change saying that no relevant changes happened yadda yadda. In that case, just brute-force check it in using the Team Explorer (just the csproj file, the csproj.vspscc he'll keep on saying that it hasn't changed but no prob).