Msbuild 如何从*.pubxml.user重写*.pubxml中的publishUrl值?

Msbuild 如何从*.pubxml.user重写*.pubxml中的publishUrl值?,msbuild,visual-studio-2015,publish-profiles,Msbuild,Visual Studio 2015,Publish Profiles,我试图覆盖相关*.pubxml中的“publishUrl”值 我试着在pubxml.user中使用,但它没有发现这一点 在*.pubxml.user中可以使用哪些允许的属性 我正在使用Visual Studio Enterprise 2015更新1 以下是我的pubxml: <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGro

我试图覆盖相关*.pubxml中的“publishUrl”值

我试着在pubxml.user中使用
,但它没有发现这一点

在*.pubxml.user中可以使用哪些允许的属性

我正在使用Visual Studio Enterprise 2015更新1

以下是我的pubxml:

<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <WebPublishMethod>FileSystem</WebPublishMethod>
    <LastUsedBuildConfiguration>Debug</LastUsedBuildConfiguration>
    <LastUsedPlatform>Any CPU</LastUsedPlatform>
    <SiteUrlToLaunchAfterPublish />
    <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
    <ExcludeApp_Data>False</ExcludeApp_Data>
    <publishUrl>C:\Developments\gsvc\Website</publishUrl>
    <DeleteExistingFiles>False</DeleteExistingFiles>
  </PropertyGroup>
</Project>

文件系统
调试
任何CPU
真的
假的
C:\Developments\gsvc\Website
假的

我无法在
publishxml.user
文件中具体执行此操作,但是如果您想要一个用户特定的include来更改
publishUrl
,您可以通过自定义
导入来执行此操作:

<Import Project="Local.pubxml.user.props" Condition="Exists('Local.pubxml.user.props')" />
然后,您还可以轻松地
.gitignore
本地.pubxml.user.props

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <publishUrl>C:\custom\Website</publishUrl>
  </PropertyGroup>
</Project>