MSBuild:$(WebPublishMethod)没有有效值

时间:2017-09-28 04:59:58

标签: msbuild

我试图用MSBuild发布我们的一个网络项目。当我直接通过VS 2017这样做时它运行正常,但是当我运行MSBuild时它会失败。

MS Build命令:

"C:\ProgramFiles(x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild" MySolution.sln /p:DeployOnbuild=true /p:Configuration=Release /p:PublishProfile=Properties/PublishProfiles/publish.pubxml

导致以下错误

  

C:\ Program Files(x86)\ Microsoft Visual   工作室\ 2017年\编译工具\的MSBuild \微软\ VisualStudio的\ V15.0 \网络\ Microsoft.Web.Publishing.targets(4359,   4):设置PublishProfile(publish.pubxml)。但$(WebPublishMethod)   没有有效值。当前价值是" FileSystem"。

我的publish.pubxml文件看起来像这样

<?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>False</ExcludeApp_Data>
         <publishUrl>\\1.1.1.1\c$\Site\mysite.se</publishUrl>
         <DeleteExistingFiles>True</DeleteExistingFiles>

</PropertyGroup>
</Project>

我做错了什么?

0 个答案:

没有答案