MSBuild 中的 SvnInfo 问题(使用 MSBuildCommunityTasks)

发布于 2024-08-18 10:47:50 字数 2207 浏览 12 评论 0原文

我有一个脚本,我将与 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

守护在此方 2024-08-25 10:47:50

问题解决了!

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文