2016-08-12 23 views
0

我正在學習如何使用TFS。我有三個.Net應用程序想要構建和釋放它們:一個是控制檯應用程序,另一個是Windows窗體應用程序,最後一個是一個ASP.NET Web應用程序。 當我構建我的控制檯和窗體窗體應用程序時,他們的構建成功完成,但我無法釋放它們。我得到了以下錯誤:Team Foundation Server在構建和發佈時出錯

Solution not found using search pattern 'C:\Agent_work\06ec66ca5\ ** \ * .sln

但是對於ASP.NET我甚至不能成功建立,並得到這個錯誤:

Unable to find version '1.0.0' of package 'Microsoft.CodeDom.DotNetCompilerPlatform'

Unable to find version '1.0.0' of package 'Microsoft.Net.Compilers'

Unexpected exit code 1 returned from tool NuGet.exe

當我檢查我的web應用程序文件夾中來源的庫,兩個軟件包都安裝在它們中,我不知道爲什麼會出現這個錯誤。

讚賞解決這些問題的任何指導。

這是我的設置在兩個窗口的形式和Web應用程序設置: enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

而結果:

enter image description here

在釋放部分它顯示:

enter image description here

構建Web應用程序:

enter image description here

那是我把所有的設置。

+0

您是否使用vNext構建或XAML構建?你可以分享構建定義設置嗎? –

+0

@ Eddie-MSFT我只是按照文檔,我不知道我正在使用哪個版本!我怎麼知道? – programmer21

+0

你跟隨什麼文檔?你能分享鏈接嗎? –

回答

0

您的搜索模式看起來像星號周圍有多餘的空格。

0

添加按照「的MSBuild參數」參數的「Visual Studio中建立」步區:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\" 

然後排隊的身材,你會得到的生成輸出發佈到神器下落文件夾中的所有項目(對於Web應用程序,輸出是一個Web部署包)。現在您可以創建發佈定義並鏈接到此構件以部署構建。

+0

我在MSBuild中複製了上面的參數,但在web版本中得到了同樣的錯誤:無法找到包'Microsoft.CodeDom.Providers.DotNetCompilerPlatform'的版本'1.0.0',並且......與上面的圖片顯示的錯誤相同。 – programmer21