FileNorFoundException - Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader

0

I am trying to access WorkItemStore object to connect to TFS from my VS code:

public WorkItemStore WorkItemStore { get { return workItemStore ?? (workItemStore = new WorkItemStore(Connection, WorkItemStoreFlags.BypassRules)); } }

and getting the below error:

System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

My Configuration:

  • Windows 10 Enterprise

  • Visual Studio Professional 2017

  • NuGet Package Manager for Visual Studio 2017

I have tried below steps as mentioned in the post Failed reference for WITDataStore.dll :

  1. manually download the package, unzip it, and copy the unzipped folder into my solution's packages\ directory.

  2. Add a reference in my project to the copy of Microsoft.TeamFoundation.WorkItemTrackingClient.DataStoreLoader.dll in the unzipped package.

  3. Add the file WITDataStore.dll as an Existing File to my project, and mark it as "Copy Always" under "Properties". ("Copy if newer" will also work just fine) Add the line to the packages.config file for my project.

Kindly help/suggest to overcome the FileNotFoundException

Thanks in advance!

c#
tfs
asked on Stack Overflow Jun 22, 2020 by Hema

1 Answer

0

FileNorFoundException - Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader

According to the error message:

Could not load file or assembly 'Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.

You are missing the reference Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader with version 15.0.0.0. But the version of the package nuget-bot.Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader you tried is 12.0.31101. That the reason why it not work for you.

According to the document Microsoft.TeamFoundation.WorkItemTracking.Client Namespace, we could to know:

You can find the Microsoft.TeamFoundation.WorkItemTracking.Client namespace in \Program Files\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0 on computers where Team Explorer is installed, in the following assembly:

  • Microsoft.TeamFoundation.WorkItemTracking.Client.dll

Since you are using the Visual Studio 2017, the reference Microsoft.TeamFoundation.WorkItemTracking.Client.DataStoreLoader.dll could be found under the path:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer

enter image description here

Hope this helps.

answered on Stack Overflow Jun 23, 2020 by Leo Liu-MSFT

User contributions licensed under CC BY-SA 3.0