[英]TFS BUILD 2010: XAML: how to make double quotes within a double quotes
[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} \\ Sources \\ Company.GOF时遇到编译器错误.Win \\ Company.GOF.Win.Interface \\ Company.GOF.Win.Interface.csproj“”“”,BuildDirectory)“。 逗号,')',或预期的有效表达式继续。 验证错误:活动'1:DynamicActivity'的私有实现具有以下验证错误:处理表达式“ String.Format(” / build Debug“” {0} \\ Sources \\ Source \\ Infrastructure \\ Infrastructure时遇到编译器错误.Interface \\ Infrastructure.Interface.csproj“”“”,BuildDirectory)“。 逗号,')',或预期的有效表达式继续。 验证错误:活动“ 1:DynamicActivity”的私有实现具有以下验证错误:处理表达式“ String.Format(” / build Debug“” {0} \\ Sources \\ Services \\ Services.Interface时遇到编译器错误\\ Company.GOF.Win.Services.Interface.csproj“”“”,BuildDirectory)“。 逗号,')',或预期的有效表达式继续。
您应该能够获得所需的东西
"""{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
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.