我尝试使用SVN MSBuild社区任务?
<SvnCopy SourcePath="$(TrunkPath)" DestinationPath="$(TagPath)" Message="AutoBuild: create tag for build" />
但是在日志中出现了以下错误:
Microsoft (R) Build Engine Version 4.0.30319.1
[Microsoft .NET Framework, Version 4.0.30319.237]
Copyright (C) Microsoft Corporation 2007. All rights reserved.
Build started 30.11.2011 13:16:37.
Project "d:\repository\FusionEnterprise\FusionWebServices\trunk\WebServicesSetu
p.msbuild" on node 1 (CreateSvnTag target(s)).
CreateSvnTag:
C:\Program Files (x86)\VisualSVN\bin\svn.exe copy "..\trunk" "..\tags\7.3.2.9
" --message "AutoBuild: create tag for build" --non-interactive --no-
auth-cache
svn: E205009: Local, non-commit operations do not take a log message or revis
ion properties
d:\repository\FusionEnterprise\FusionWebServices\trunk\WebServicesSetup.msbuild
(104,5): error MSB6006: "svn.exe" exited with code 1.
Done Building Project "d:\repository\FusionEnterprise\FusionWebServices\trunk\W
ebServicesSetup.msbuild" (CreateSvnTag target(s)) -- FAILED.
Build FAILED.
"d:\repository\FusionEnterprise\FusionWebServices\trunk\WebServicesSetup.msbuil
d" (CreateSvnTag target) (1) ->
(CreateSvnTag target) ->
d:\repository\FusionEnterprise\FusionWebServices\trunk\WebServicesSetup.msbui
ld(104,5): error MSB6006: "svn.exe" exited with code 1.
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.20
使用了VisualSVN命令行应用程序。
但是当我在控制台中输入:svn --version
,会得到以下输出:
svn, version 1.7.1-SlikSvn-1.7.1-X64 (SlikSvn/1.7.1) X64
compiled Oct 26 2011, 14:18:24
使用了SlikSvn命令行工具。
Path=%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;c:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft SQL Server\90\Tools\binn\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\SlikSvn\bin;C:\Program Files (x86)\VisualSVN\bin
我尝试使用下一个MSBuild任务:
<SvnCopy SourcePath="$(TrunkPath)" DestinationPath="$(TagPath)" Message="AutoBuild: create tag for build" ToolPath="C:\Program Files\SlikSvn\bin\svn.exe" />
并且
<SvnCopy SourcePath="$(TrunkPath)" DestinationPath="$(TagPath)" Message="AutoBuild: create tag for build" ToolPath="C:\Program Files\SlikSvn\bin" />
但它的工作不正确。
我不明白如何为msbuild设置正确的svn应用程序,也找不到这方面的信息在谷歌上。 有人可以澄清一下吗?
补充:
如果使用任务<SvnCopy SourcePath="$(TrunkPath)" DestinationPath="$(TagPath)" />
VisualSVN就可以正常工作。