2011-11-02 109 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