J Bryan Price
J Bryan Price

Reputation: 1384

Why am I getting a ProjectGuid in my web.config file when publishing a web project?

In VS2015, I've recently been getting an XML comment added to my web.config file for website projects that I publish:

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

This only happens when my project has a web.config transform file in effect (Web.Debug.config or a Web.Release.config).

I tried scouring the interweb but the only thing I found was in reference to dealing with the presence of the comment: https://github.com/projectkudu/kudu/issues/2064.

It's obviously not functionally an issue, but since we have multiple developers publishing this project at different times to our version control system, and only my system seems to be adding this line, it's going to cause a lot of commit noise.

Upvotes: 10

Views: 3890

Answers (1)

Gregory
Gregory

Reputation: 136

In file Properties\PublishProfiles\Release.pubxml add <IgnoreProjectGuid>True</IgnoreProjectGuid>

Example:

<?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>

Upvotes: 12

Related Questions