MSBuild 中的 SvnInfo 问题(使用 MSBuildCommunityTasks)
我有一个脚本,我将与 cc.net 一起使用。但现在我面临着 RepositoryPath 属性的问题。以下脚本(从 MSBuildCommunityTask 中摘录的示例脚本)给我带来了麻烦:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion ="3.5">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Target Name="RemoteInfo">
<SvnInfo RepositoryPath="http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Master.proj">
<Output TaskParameter="RepositoryPath" PropertyName="RepositoryPath" />
<Output TaskParameter="RepositoryRoot" PropertyName="RepositoryRoot" />
<Output TaskParameter="LastChangedAuthor" PropertyName="LastChangedAuthor" />
<Output TaskParameter="LastChangedRevision" PropertyName="LastChangedRevision" />
<Output TaskParameter="LastChangedDate" PropertyName="LastChangedDate" />
<Output TaskParameter="Schedule" PropertyName="Schedule" />
<Output TaskParameter="NodeKind" PropertyName="NodeKind" />
<Output TaskParameter="RepositoryUuid" PropertyName="RepositoryUuid" />
</SvnInfo>
<Message Text="RepositoryRoot: $(RepositoryRoot)" />
<Message Text="RepositoryPath: $(RepositoryPath)" />
<Message Text="LastChangedAuthor: $(LastChangedAuthor)" />
<Message Text="LastChangedRevision: $(LastChangedRevision)" />
<Message Text="LastChangedDate: $(LastChangedDate)" />
<Message Text="Schedule: $(Schedule)" />
<Message Text="NodeKind: $(NodeKind)" />
<Message Text="RepositoryUuid: $(RepositoryUuid)" />
</Target>
</Project>
命令行:
D:\Test>msbuild test.build /target:RemoteInfo
答案是:
D:\_SolutionTrunk\build\test.build(7,2): error MSB6001: Ungültiger Befehlszeilenschalter für "svn.exe". Illegales Zeichen im Pfad.
可以翻译为:“svn.exe”的无效命令行开关。路径中存在非法字符。
当然,实际上我将在我的脚本中使用 SvnCheckout 任务以及 RepositoryPath="https://mySvnServer.myIntranet.myDomain:8443/ svn/repository/someName/trunk
我总是面临同样的错误。
I have a script, that I will use together with cc.net. But for now I'm facing a problem with the RepositoryPath attribute. The following script (extract of the sample script from MSBuildCommunityTask) is giving me troubles:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
ToolsVersion ="3.5">
<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<Target Name="RemoteInfo">
<SvnInfo RepositoryPath="http://msbuildtasks.tigris.org/svn/msbuildtasks/trunk/Master.proj">
<Output TaskParameter="RepositoryPath" PropertyName="RepositoryPath" />
<Output TaskParameter="RepositoryRoot" PropertyName="RepositoryRoot" />
<Output TaskParameter="LastChangedAuthor" PropertyName="LastChangedAuthor" />
<Output TaskParameter="LastChangedRevision" PropertyName="LastChangedRevision" />
<Output TaskParameter="LastChangedDate" PropertyName="LastChangedDate" />
<Output TaskParameter="Schedule" PropertyName="Schedule" />
<Output TaskParameter="NodeKind" PropertyName="NodeKind" />
<Output TaskParameter="RepositoryUuid" PropertyName="RepositoryUuid" />
</SvnInfo>
<Message Text="RepositoryRoot: $(RepositoryRoot)" />
<Message Text="RepositoryPath: $(RepositoryPath)" />
<Message Text="LastChangedAuthor: $(LastChangedAuthor)" />
<Message Text="LastChangedRevision: $(LastChangedRevision)" />
<Message Text="LastChangedDate: $(LastChangedDate)" />
<Message Text="Schedule: $(Schedule)" />
<Message Text="NodeKind: $(NodeKind)" />
<Message Text="RepositoryUuid: $(RepositoryUuid)" />
</Target>
</Project>
Command line:
D:\Test>msbuild test.build /target:RemoteInfo
The answer is:
D:\_SolutionTrunk\build\test.build(7,2): error MSB6001: Ungültiger Befehlszeilenschalter für "svn.exe". Illegales Zeichen im Pfad.
Which can be translated as: Invalid commandline switch for "svn.exe". Illegals Character in path.
Of course actually I'll use the for my script the SvnCheckout Task with a RepositoryPath="https://mySvnServer.myIntranet.myDomain:8443/svn/repository/someName/trunk
I'm always facing the same error.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题解决了!
在 MSBuildCommunityTask 中使用任何 Subversion 任务时,都会在PATH-变量中查找命令行 Subversion (svn.exe) 的位置。
我的计算机上有一个非法字符 (")。这会引发异常,表示路径中存在非法字符...
我误解了该错误,我认为非法字符位于 RepositoryPath 属性中。
Problem solved!
When using any Subversion Task in MSBuildCommunityTask, the location for the command-line Subversion (svn.exe) is been looked-up in the PATH-Variable.
On my computer was an illegal Character ("). This throws an exception, which says, there is an illegal character in the path...
I misunderstood the error, I thought the illegal character was in the RepositoryPath-Attribute.