2012-03-21 125 views
3

我試圖使用社區TFS Build Extensions將Azure活動作爲TFS構建的一部分部署到Azure。在TFS中使用TFS構建擴展2010 Azure構建流程模板

我已經添加了從TfsBuildExtensions.Activities.dll和TfsBuildExtensions.Activities.Azure.dll活動,我能夠從TfsBuildExtensions任何活動到我的構建過程中,他們正常工作

的問題,開始的時候我從TfsBuildExtensions-Azure中拖動一個活動。除了通用活動圖標,Gui顯示中的活動標題保持空白。屬性窗格顯示無法編輯此活動的屬性。最後,在保存這一​​構建過程模板時,出現以下錯誤:

System.IO.FileNotFoundException: Could not load file or assembly 'ServiceManagement, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. 
File name: 'ServiceManagement, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' 
    at System.Signature.GetSignature(SignatureStruct& signature, Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType) 
    at System.Signature..ctor(IRuntimeMethodInfo methodHandle, RuntimeType declaringType) 

我在做什麼錯還是我失去了什麼參考?

+0

您是否在構建服務器上安裝了Azure SDK? – jessehouwing 2012-03-21 18:55:17

+0

在Visual Studio中,我傾向於創建一個虛擬項目,在其中放置構建工作流程。然後,我爲那個項目添加引用它的任何抱怨。這通常解決了設計時間問題。 – jessehouwing 2012-03-22 08:49:53

回答

1

我下載了該項目的來源,發現有在項目文件中的ServiceManagement.dll參考,並DLL可以在他們的源代碼控制中找到。

從源代碼下載DLL,並將其添加到項目引用已解決問題。

我在MSDN Blogs上發現了一個關於ServiceManagement.dll的參考,它圍繞着Azure部署,但似乎dll的原始源已經消失。

+0

[tfsbuildextensions的開發者指出](https://tfsbuildextensions.codeplex.com/discussions/349635)ServiceManagement.dll最初來自編譯[「來自Microsoft的」Windows Azure ServiceManagement Sample「](http://code.msdn .microsoft.com/windowsazure/Windows的Azure的CSManage-e3f1882c)。 他們不希望將其包含在發佈的軟件包中,以「避免任何潛在的重新分配權利陷阱」。 – 2013-04-05 18:48:20

0

Idea-確認您正在使用.NET 4.0 Framework目標而不是.NET 4.0 Client Profile。有時後者會導致看起來'明顯'的程序集無法加載,因爲它們具有不在客戶端配置文件中的依賴關係。

本身不是一個解決方案,但是對於另一種進行調試的方式,您可能需要打開融合日誌記錄並使用Fusion Log Viewer來查看程序集綁定錯誤。至少它會告訴你運行時在哪裏查找這些未找到的程序集。

以下是斯科特Hanselman在如何做到這一點一些明確的指示: http://www.hanselman.com/blog/BackToBasicsUsingFusionLogViewerToDebugObscureLoaderErrors.aspx