在TFS中使用TFS构建扩展2010 Azure构建流程模板

问题描述:

我试图使用社区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

我下载了该项目的来源,发现有在项目文件中的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

Idea-确认您正在使用.NET 4.0 Framework目标而不是.NET 4.0 Client Profile。有时后者会导致看起来'明显'的程序集无法加载,因为它们具有不在客户端配置文件中的依赖关系。

本身不是一个解决方案,但是对于另一种进行调试的方式,您可能需要打开融合日志记录并使用Fusion Log Viewer来查看程序集绑定错误。至少它会告诉你运行时在哪里查找这些未找到的程序集。

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