Buid definition: Error HRESULT E_FAIL has been returned from a call to a COM component

时光毁灭记忆、已成空白 提交于 2019-12-07 07:21:17

问题


When I add a new work item to TFS, build definition throw a exception as below:

Exception Message: Error HRESULT E_FAIL has been returned from a call to a COM component. (type COMException)
Exception Stack Trace:    at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.DataStoreNative.BeginDataStoreInit(IntPtr handle, String defaultCachePath, String instanceId, Int32 cacheVersion)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.DataStore.Datastore.BeginDataStoreInit(String defaultCachePath, String instanceId, Int32 cacheVersion)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.InitializeInternal()
   at Microsoft.TeamFoundation.Client.TfsTeamProjectCollection.InitializeTeamFoundationObject(String fullName, Object instance)
   at Microsoft.TeamFoundation.Client.TfsConnection.CreateServiceInstance(Assembly assembly, String fullName)
   at Microsoft.TeamFoundation.Client.TfsConnection.GetService(Type serviceType)
   at Microsoft.TeamFoundation.Client.TfsConnection.GetServiceT
   at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContextT
   at System.Activities.InArgument`1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
   at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate)
   at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary`2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

I cannot dertermine the root cause. Please help me if you can!


回答1:


This issue arises when:
1. They try to create a new work item – user story, bug, task etc.
2. They try to edit an existing query.
3. They try to open a work item from a query result set.
4. They search for a work item by the WI ID.

Please try two ways to resolve this problem:

  1. Restart machine server in order to install TFS
  2. Try to delete the project cache which path likes:

C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache or
C:\Program Files(x86)\Microsoft Visual Studio 10.0\Common7\IDE\ProjectTemplatesCache

Then run "devenv.exe /setup" to re-build the cache.
Start—>Run—> C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe /setup

I've faced with the problem. I've resolved it by use #1



来源:https://stackoverflow.com/questions/24447672/buid-definition-error-hresult-e-fail-has-been-returned-from-a-call-to-a-com-com

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