TFS2013无法反序列化包含" $ /"的参数。

时间:2015-12-29 17:01:11

标签: tfs tfs2013

我使用TFS 2013 XAML构建过程模板,并且有一些包含TFS路径的参数(即以$/开头),并且在反序列化参数时构建立即失败。

我唯一的解决方法是使用$\/,但这会被推翻,因为它确实会破坏期望$/的内容。我有什么方法可以正确地逃脱这些字符串吗?

e.g。

Post-build script arguments: -Path1 "$/MyProject/MySolution.sln" -Path2 $/MyProject/NuGet"
MSBuild arguments: /p:PackageOutputDir="$/MyProject/NuGet"

当我尝试运行构建时,这会导致以下类型的异常:

Exception Message: TF401070: Could not deserialize the JSON string provided. Details:
After parsing a value an unexpected character was encountered: \. Path 'PostActionScriptArguments', line 1, position 449. (type BuildParameterSerializationException)
Exception Stack Trace:    at Microsoft.TeamFoundation.Build.Common.BuildParameter.set_Json(String value)

Inner Exception Details:

Exception Message: After parsing a value an unexpected character was encountered: \. Path 'PostActionScriptArguments', line 1, position 449. (type JsonReaderException)
Exception Stack Trace:    at Newtonsoft.Json.JsonTextReader.ParsePostValue()

0 个答案:

没有答案