TFS BUILD 2010:XAML:如何在双引号内制作双引号

时间:2011-11-02 11:49:58

标签: xaml workflow-foundation tfsbuild

[String.Format("/build Debug "{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj"", BuildDirectory)]

说我想要从===>获得另一个双引号{0} \ Sources \ Source \ Infrastructure \ Infrastructure.Interface \ Infrastructure.Interface.csproj< ===,但它只能在String.Format()中允许一次" ...我该怎么办?

我试过=> \“,@”他们根本不工作......

===

如果我试过=> “”“< ==

这就是我得到的:

  

构建过程验证失败。详细信息:验证错误:   私人实施活动'1:DynamicActivity'有   以下验证错误:遇到处理的编译器错误   表达式“String.Format(”/ build Debug   “” “{0} \源头\ Company.GOF.Win \ Company.GOF.Win.Interface \ Company.GOF.Win.Interface.csproj” “””,   BuildDirectory)“。逗号,')'或有效的表达式延续   预期。验证错误:活动的私有实现   '1:DynamicActivity'具有以下验证错误:编译器   处理表达式“String.Format(”/ build   调试   “” “{0} \源头\源\基础设施\ Infrastructure.Interface \ Infrastructure.Interface.csproj” “””,   BuildDirectory)“。逗号,')'或有效的表达式延续   预期。验证错误:活动的私有实现   '1:DynamicActivity'具有以下验证错误:编译器   处理表达式“String.Format(”/ build   调试   “” “{0} \来源\ SERVICES \ Services.Interface \ Company.GOF.Win.Services.Interface.csproj” “””   BuildDirectory)“。逗号,')'或有效的表达式延续   预期

1 个答案:

答案 0 :(得分:4)

你应该能够通过

得到你需要的东西
"""{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj"""

修改
根据您的输出判断,您设置了:

String.Format("/build Debug """{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory)

这是合理的失败。
这应该工作:

String.Format("/build Debug ""{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory)

(唯一的区别是""{0}\Sources\而不是"""{0}\Sources