我需要在msbuild proj文件中的標籤內使用「>」將devenv輸出重定向到文件。我的代碼是如何在msbuild proj文件中使用「>」
<Exec Command='"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /build "Release|x86" ..\MySolution.sln ">" log.txt'/>
但它不爲我工作。請回答我如何在XML標籤中使用「>」。
我需要在msbuild proj文件中的標籤內使用「>」將devenv輸出重定向到文件。我的代碼是如何在msbuild proj文件中使用「>」
<Exec Command='"C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe" /build "Release|x86" ..\MySolution.sln ">" log.txt'/>
但它不爲我工作。請回答我如何在XML標籤中使用「>」。
使用character entities的魔法!
> or >
< or <
" or "
' or '
& or &
輸出:
>或>
< 或<
"或"
'或'
&或&
<Exec Command='"C:\Program Files (x86)\Microsoft Visual Studio
9.0\Common7\IDE\devenv.exe" /build "Release|x86" ..\MySolution.sln > log.txt'/>
我認爲你需要在xml中將實體字符集&gt;
設置爲>
否則它會將該符號解釋爲標記終止字符。
你忘了在{code}塊中忘記第二個:o – Nicodemeus