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」のコマンドラインスイッチが無効です。パス内の不正な文字。

もちろん、実際には、 RepositoryPath = "https://mySvnServer.myIntranet.myDomain:8443/svn/repository/someName/trunkを使用して、スクリプトにSvnCheckoutタスクを使用します。

私はいつも同じエラーに直面しています。

4

1 に答える 1

3

問題が解決しました!

MSBuildCommunityTaskでSubversionタスクを使用する場合、コマンドラインSubversion(svn.exe)の場所がPATH -Variableで検索されます。
私のコンピュータには不正な文字( ")がありました。これにより、パスに不正な文字が含まれているという例外がスローされます...
エラーを誤解し、不正な文字がRepositoryPath -Attributeにあると思いました。

于 2010-01-21T10:00:44.497 に答える