2011-11-02 199 views
2
[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()中允许一次&quot; ...我该怎么办?TFS BUILD 2010:XAML:如何在双引号内制作双引号

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

===

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

这是我得到了什么:

The build process failed validation. Details: Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Company.GOF.Win\Company.GOF.Win.Interface\Company.GOF.Win.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Source\Infrastructure\Infrastructure.Interface\Infrastructure.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected. Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "String.Format("/build Debug """{0}\Sources\Services\Services.Interface\Company.GOF.Win.Services.Interface.csproj"""", BuildDirectory)". Comma, ')', or a valid expression continuation expected.

回答

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

+0

啊....没有运气...... “””不行... – lannyboy

+0

尝试“”现在......希望这能解决:) – lannyboy

+0

哦,甜蜜!现在这个“”对我来说非常完美:) – lannyboy