更改 Visual Studio 解决方案的所有项目以使用 IIS Express

发布于 2024-12-11 00:26:52 字数 110 浏览 2 评论 0原文

有谁知道更改 Visual Studio 解决方案中的所有 Web 项目以便使用 IIS Express 的技巧。

想象一下通过单击每个“属性”来转换 100 个 Web 应用程序项目...

Does anyone know a trick to change all web projects in a Visual Studio solution so that they use IIS Express.

Imagine converting 100 Web Application projects by clicking each "Properties"...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

暗恋未遂 2024-12-18 00:26:52

您可以直接编辑 .csproj 文件,也可以对所有文件进行查找和替换。我确信有一种更优雅的方式。

这些设置存储在:

<ProjectExtensions>
    <VisualStudio>
    <WebProjectProperties>
              <UseIIS>False</UseIIS>
              <AutoAssignPort>True</AutoAssignPort>
              <DevelopmentServerPort>56051</DevelopmentServerPort>
              <DevelopmentServerVPath>/</DevelopmentServerVPath>
              <IISUrl>
              </IISUrl>
              <NTLMAuthentication>False</NTLMAuthentication>
              <UseCustomServer>False</UseCustomServer>
              <CustomServerUrl>
              </CustomServerUrl>
              <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
            </WebProjectProperties>
     ...

You could edit the .csproj files directly, maybe do a find and replace on all of them. I'm sure there's a more elegant way.

Those settings are stored under:

<ProjectExtensions>
    <VisualStudio>
    <WebProjectProperties>
              <UseIIS>False</UseIIS>
              <AutoAssignPort>True</AutoAssignPort>
              <DevelopmentServerPort>56051</DevelopmentServerPort>
              <DevelopmentServerVPath>/</DevelopmentServerVPath>
              <IISUrl>
              </IISUrl>
              <NTLMAuthentication>False</NTLMAuthentication>
              <UseCustomServer>False</UseCustomServer>
              <CustomServerUrl>
              </CustomServerUrl>
              <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
            </WebProjectProperties>
     ...
つ低調成傷 2024-12-18 00:26:52

目前没有简单的方法来转换大量项目。 PowerShell 脚本可以完成这项工作,但我没有找到,而且我现在不打算编写它。

There is no easy way at the moment for converting a lot of projects. A PowerShell script would do the job but I didn't find one and I don't intend to write it the moment.

满身野味 2024-12-18 00:26:52

使用像notepad ++这样的像样的编辑器来执行“在文件中替换”,然后只需将False全局替换为True; 位于目录树中的所有 *.csproj 和所有 *.csproj.user 文件上。

Use a decent editor like notepad++ to do a "replace in files", then just do a global replace of <UseIIS>False</UseIIS> with <UseIIS>True</UseIIS> on all *.csproj and all *.csproj.user files in your directory tree.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文