Team Foundation Server unable to build. Missing libraries or components?

半腔热情 提交于 2019-12-12 17:38:54

问题


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!!

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.

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?

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))

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:

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.


回答1:


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 packages (recommended). Add packages/dll required

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

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

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)



来源:https://stackoverflow.com/questions/26404085/team-foundation-server-unable-to-build-missing-libraries-or-components

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!