1

我已通過VS2012中的發佈GUI刪除了一些舊的舊發佈配置文件(包括名爲'Package'的配置文件)。當我檢查代碼並通過TeamCity運行構建時,出現以下錯誤。VS2012發佈配置文件破解TeamCity

Rebuild MSBuild 
trunk\SomeService\SomeService.csproj 
ValidatePublishProfileSettings 
GetPublishingLocalizedString 
C:\Program Files  (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4253, 5): The value  for PublishProfile is set to 'Package', expected to find the file at  'E:\BuildAgent2\work\6ec5bd58ee82179a\trunk\SomeService\Properties\PublishProfiles\Package.pubxml'  but it could not be found. 
GetPublishingLocalizedString 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4260, 4): PublishProfile(Package) is set. But the $(WebPublishMethod) does not have a valid value. Current  Value is "". 
Error 
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4267, 5): Target ValidatePublishProfileSettings Failed 
Project trunk\SomeService\SomeServiceService.csproj failed. 
trunk\SomeService\SomeServiceTests.csproj 
Project trunk\SomeServiceTests\SomeServiceTests.csproj failed. 
Project trunk\SomeService.sln failed. 

出於某種原因,我似乎無法獲得參考的乘坐這種舊的Web部署發佈配置文件(「Package.pubxml」)。我在.proj文件中看不到任何明顯的東西。

構建是香草VS打造的TeamCity

Runner: Visual Studio Step name: build 
Solution File: trunk/SomeService.sln 
Visual Studio: VS 2012 
Targets: Rebuild 
Configuration: Release 
Command line params: 'emtpy' 

我如何能明確下來這個古老的發佈配置有什麼建議?或者爲什麼當我只是在做一個簡單的構建時,甚至會首先被調用?當我通過命令提示符在本地調用MSBuild時,一切正常。

任何幫助極大讚賞

+0

仍然停留在此。任何建議感激。 VS不想放棄這個舊的發佈配置文件。已經嘗試了一些東西,解決方案乾淨,在proj文件中查找引用,刪除所有發佈配置文件並重新開始。 –

回答

0

嘗試更改您的跑步者類型爲MSBuild。您的「構建文件路徑」將成爲您的解決方案路徑並適當設置所有其他字段。

+0

謝謝Adarsh。一些很好的建議。我有另一個構建運行。無法回想一下,如果我更改此版本以匹配。星期一會看看。希望我忘了將build runner更改爲MSBuild。 –

+0

沒有快樂。使用MSBuild轉輪時得到相同的錯誤。我相信這是VS跑壘員在引擎蓋下使用的。奇怪的是,我已經把所有的文件都轉移到了新的解決方案中,包括新的項目文件和乾淨的發佈配置文件,但我仍然遇到了錯誤。爲什麼不會忘記這個舊的發佈配置文件?很奇怪。 –

+1

嘗試在teamcity中創建一個新項目,然後在那裏創建構建配置。它將分配一個新的GUID並在構建框上有一個新的路徑。 –

0

原來我已經設置了一些系統參數,其中強制發佈使用舊的發佈配置文件!

system.DeployOnBuild true 
system.PublishProfile package 

Adarsh感謝您的幫助。你建議創建一個新項目是合理的。似乎這些參數是在根層建立的,所以仍然被拾取。

相關問題