不久前,我決定開始使用Nuget管理第三方庫。但是,自從我開始使用Nuget後,Teamcity不再能夠構建解決方案。T4:MSBuild和Nuget集成
所以,我有一個WindowsPhone項目,我使用t4模板作爲配置文件。我遵循Oleg Sych's instruction來整合MSBuild和T4。這個項目在我的TeamCity構建服務器上構建得很好。好吧,直到我開始使用Nuget。添加了一些軟件包並將RestorePackaged設置爲true,之後我不再能夠在TeamCity中構建解決方案。
我的TeamCity得到的錯誤是:
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Invalid token 'this' in class, struct, or interface member declaration. Line=1, Column=1
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Method must have a return type. Line=1, Column=6
C:\Program Files\MSBuild\Microsoft\VisualStudio\TextTemplating\v10.0\Microsoft.TextTemplating.targets(396, 5):
Compiling transformation: Type expected. Line=1, Column=12
爲T4模板的輸出文件包含以下信息:ErrorGeneratingOutput
使用VS2010的解決方案也失敗了我的本地機器建立。但是,問題是MSBuild處理T4模板並生成輸出文件,但它不會將其添加到項目文件中。所以,構建失敗是因爲它無法找到特定的類。
有沒有人遇到類似的問題?有沒有修復?或者有人可以告訴我應該在哪裏尋找解決辦法?
我真的很感激任何幫助解決這個問題。
謝謝!
軟件包是否能正確恢復功能下載包?來自nuget的任何錯誤輸出? –
是的,還原功能正常工作。 Nuget不輸出錯誤。 – Mike