gpt4 book ai didi

visual-studio-2015 - 发布Web项目时,为什么我的web.config文件中包含ProjectGuid?

转载 作者:行者123 更新时间:2023-12-04 06:55:42 31 4
gpt4 key购买 nike

在VS2015中,我最近在我发布的网站项目的web.config文件中添加了XML注释:

<!--ProjectGuid: CDCD60A4-F8AC-4343-A798-8B9917B7711D-->

仅当我的项目具有有效的web.config转换文件(Web.Debug.config或Web.Release.config)时,才会发生这种情况。

我试着搜索了interweb,但是我发现的唯一发现是关于处理注释的存在: https://github.com/projectkudu/kudu/issues/2064

从功能上讲,这显然不是问题,但是由于我们有多个开发人员在不同的时间将该项目发布到我们的版本控制系统中,并且只有我的系统似乎在添加此行,这会引起很多提交噪音。

最佳答案

在文件Properties\PublishProfiles\Release.pubxml中添加<IgnoreProjectGuid>True</IgnoreProjectGuid>
例子:

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0"xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>True</ExcludeApp_Data>
<publishUrl>C:\inetpub\wwwroot\</publishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
<IgnoreProjectGuid>True</IgnoreProjectGuid>
</PropertyGroup>
</Project>

关于visual-studio-2015 - 发布Web项目时,为什么我的web.config文件中包含ProjectGuid?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39732135/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com