如何在不污染 .csproj 文件的情况下使用 IIS Express
我最近切换到 IIS Express 进行 asp.net 开发,但我不明白单击“使用 IIS Express...”(Visual Studio 中项目的上下文菜单)会影响 .csproj 文件...
问题是当我提交更改(源代码控制) 我还提交了新的 IIS Express 配置,在我看来,这是用户首选项配置。因此,应将其写入 .suo 文件(源代码管理会忽略该文件)。
我知道这比问题更杂乱,但我想也许有人会有解决方案。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不幸的是,VS 通过这些项目设置来判断是使用 Cassini 还是 IIS Express。但是,您可以选择将项目服务器设置保存在 proj.user 文件中,这样它们就不会签入到源代码管理中。在项目属性下 -> Web,您可以取消选择“将服务器设置应用于所有用户”选项:
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:
只是对已接受答案的额外评论...您可能会发现 Visual Studio 2010 很难接受与签入相关的更改,并且让它烦人地忽略您的更改,说没有发生相关更改 yadda yadda。在这种情况下,只需使用团队资源管理器进行强力检查(仅使用 csproj 文件,csproj.vspscc,他会继续说它没有更改,但没有问题)。
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).