0

以下のようにmsbuildコマンドがあります

my $cmd = "msbuild /v:n /target:clean;publish /p:Configuration=".$buildConfig." \"".$solutionPath."\" /p:OutputPath=" ."\"$outputdir\" /p:SolutionDir="."\"$sourceDir\\";

コンパイルすると、これは私には問題ないように見える正確なコマンドです。なぜ行末に " がないのかわかりません。

msbuild /v:n /target:clean;publish /p:Configuration=Release "D:\Projects\Suite\Verify\Manager\source\Project1\Project1.csproj" /p:OutputPath="D:\Repository\Suite\Project1" /p:SolutionDir="D:\Projects\Suite\Verify\

また、コマンドラインで正確なテキストをコピーすると、エラーなしで機能します。

しかし、perlスクリプトから実行すると、次のエラーが発生します

(PostBuildEvent target) -> 
 c:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(3717,9): error MSB3073: The command "copy "D:\Projects\Suite\Verify\ 2>&1\Common\libraries\ABC.NET\ABC9-32.dll" "D:\Projects\Suite\Verify\ 2>&1bin\Release\"" exited with code 1. [D:\Projects\Suite\Verify\Common\source\Plan\Plan.csproj]

ここ" 2>&1"にどこかから追加されていますが、それを処理する方法がわかりませんか?

基本的に project1 は、ビルド後のイベントが file をコピーするように設定されている Plan に依存しています"ABCpdf9-32.dll"。なぜこのエラーが発生するのですか? 解決策は何ですか。助けてください

4

1 に答える 1