Team Foundation Server 无法生成.缺少库或组件? [英] Team Foundation Server unable to build. Missing libraries or components?

查看:17
本文介绍了Team Foundation Server 无法生成.缺少库或组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 TFS 和构建服务器创建构建.这是我第一次尝试构建服务器,但进展不顺利!!

I am trying to create a build using TFS and a build server. This is my first attempt with the build server and it is not going well!!

我使用的是 Visual Studio 2012 和 TFS 2012.
该项目是用 VB.Net 编写的,并使用了相当多的参考资料.当我在我的开发机器上构建项目时,我没有任何问题;但后来我安装了 Outlook 2013 和所有各种必需的组件.

I am using Visual Studio 2012 and TFS 2012.
The project is written in VB.Net and uses a fair number of references. When I build the project on my dev machine I have no issues; but then I have Outlook 2013 installed and all the various required components.

当我将项目发送到构建服务器时,我收到许多关于缺少与 Outlook 相关的类型以及一些神秘库的警告.
我无法将 Outlook 放在构建服务器上;那么我该如何解决这个问题?

When I send the project off to the build server I am getting many warnings about missing types that pertain to outlook plus a couple of mystery library's.
I cannot put outlook on the build server; so how do I resolve this problem?

这里有一些消息.er.vb (45):未定义类型Outlook.Recipient".er.vb (42):未定义类型Outlook.NameSpace".er.vb (39):未定义类型Interop.Outlook.Application".rs.vb (1141):未定义类型Interop.Outlook.Attachment".rs.vb (1144):未声明Outlook".由于其保护级别,它可能无法访问.

here are some of the messages. er.vb (45): Type 'Outlook.Recipient' is not defined. er.vb (42): Type 'Outlook.NameSpace' is not defined. er.vb (39): Type 'Interop.Outlook.Application' is not defined. rs.vb (1141): Type 'Interop.Outlook.Attachment' is not defined. rs.vb (1144): 'Outlook' is not declared. It may be inaccessible due to its protection level.

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1988): 
Cannot get the file path for type library "2df8d04c-5bfa-101b-bde5-00aa0044de52" version 2.7. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1988): 
Cannot get the file path for type library "00062fff-0000-0000-c000-000000000046" version 9.5. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))

底部 2 条消息与 Outlook 无关,坦率地说,我不确定它在那里寻找什么?

The bottom 2 messages are not Outlook related, frankly I am unsure what it is looking for there?

尝试构建的最终消息是:

The final message from the attempted build is:

异常消息:MSBuild 错误 1 ​​已结束此构建.您可以在上述消息中找到有关此错误原因的更多具体信息.(类型 BuildProcessTerminateException)异常堆栈跟踪:在 System.Activities.Statements.Throw.Execute(CodeActivityContext context)在 System.Activities.CodeActivity.InternalExecute(ActivityInstance 实例,ActivityExecutor 执行器,BookmarkManager bookmarkManager)在 System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Exception Message: MSBuild error 1 has ended this build. You can find more specific information about the cause of this error in above messages. (type BuildProcessTerminateException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

我假设我收到这个是因为缺少各种组件?任何帮助将不胜感激.

I'm assuming I am receiving this because of the various missing components? Any assistance would be greatly appreciated.

推荐答案

您很可能有许多仅存在于 GAC 中或位于本地程序文件树中的引用.在文本编辑器中打开您的项目文件添加看看是否有.您需要通过以下两种方式之一使用源代码树中的 lib 引用替换它们.

You most likely have a number of references that only exist in your GAC or are in your local program files tree. Open up your project files in a text editor add see if there are. You need to replace these with lib references from your source tree in one of two ways.

  1. Nuget 软件包(推荐).添加需要的包/dll

  1. Nuget packages (recommended). Add packages/dll required

lib 文件夹(旧方法).在源代码树中创建一个文件夹并放入所需的 dll.-

lib folder (older method). Create a folder in your source tree and drop in the dlls that you require.-

如果您更新您的参考资料,然后更新您的 scm.然后,您的构建应该是自包含和构建的.

If your update your references and then update your scm. Your build should then be self contained and build.

在构建代理上安装大型软件包以修复 dll 引用是不好的做法,构建代理应尽可能保持干净.源树应该包含构建它所需的所有链接/信息.(除了 .dot 网络框架)

Installing large software packages on a build agent to fix a dll reference is bad practice and a build agent should be left as clean as possible. A source tree should contain all links/info to what is needed to build it. (except maybe the .dot net framework)

这篇关于Team Foundation Server 无法生成.缺少库或组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆