gpt4 book ai didi

msbuild - 脚本不会为 VS2012 发布网站

转载 作者:行者123 更新时间:2023-12-02 00:18:09 24 4
gpt4 key购买 nike

使用从命令行调用的以下 MSBuild 脚本,我尝试运行在 Visual Studio 2012 中运行良好的发布选项。

<Target Name="BuildRelease">
<MSBuild
Properties="Configuration=Release;DeployOnBuild=True;
DeployTarget=Publish;CreatePackageOnPublish=True"
StopOnFirstFailure="true"
Projects="$(BuildDirectory)\BigWave.ALL.sln"></MSBuild>
</Target>

我的 Project.pubxml 是...

<Project ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<SiteUrlToLaunchAfterPublish />
<publishUrl>c:\temp\Deploy</publishUrl>
<DeleteExistingFiles>False</DeleteExistingFiles>
</PropertyGroup>
</Project>

Project.pubxml.user 是...

<Project ToolsVersion="4.0" 
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<TimeStampOfAssociatedLegacyPublishXmlFile />
</PropertyGroup>
...snipped ItemGroup which has all my files and last timestamp of publish
</Project>

这些文件是否有问题导致“发布”选项无法正常工作?脚本运行没有错误,但是当我查看 C:\temp\Deploy 目录 时,没有文件。

最佳答案

根据这个http://sedodream.com/2012/08/19/VisualStudioProjectCompatabilityAndVisualStudioVersion.aspx当您将 VS2010 和 VS2012 用于相同的解决方案时,您必须指定您使用的 VS 版本。我只是添加了版本,现在它可以工作了。

希望对你有帮助!

最好的问候

关于msbuild - 脚本不会为 VS2012 发布网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12222805/

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