Unable to load DLL 'Microsoft.WITDataStore32.dll' (TeamFoundation.WorkItemTracking)

13.8k views Asked by At

I am posting this in the hope that it will save someone else the time and effort of figuring this one out:

My current setup is VS2015 against TFS 2013.4

Problem

My old PC setup had VS2013, and I had been using the Microsoft.TeamFoundation.WorkItemTracking.Client namespace to get some Work Item information from TFS.

I recently had to rebuild my PC, and continued development of a program that gets this information.

To my dismay, I kept getting an error:

Unable to load DLL 'Microsoft.WITDataStore32.dll'
5

There are 5 answers

1
lvmeijer On BEST ANSWER

You don't need to install the TFS object model/Team Explorer anymore. You can use the NuGet package

Also with the NuGet package, you may run into the same issue that your application cannot find the native DLL.

The text below is copied from https://connect.microsoft.com/VisualStudio/feedback/details/1695433/team-foundation-server-2015-sdk-missing-microsoft-witdatastore64-dll

Microsoft.WITDataStore*.dll is part of the ExtendedClient package, they are native dlls and cannot be referenced in managed project. You will need to manually copy the dll into your bin folder for runtime resolution.

Microsoft.WITDataStore32.dll is in ..\Microsoft.TeamFoundationServer.ExtendedClient.14.83.1\lib\native\x86 Microsoft.WITDataStore64.dll is in ..\Microsoft.TeamFoundationServer.ExtendedClient.14.83.1\lib\native\amd64

(note these paths point to the NuGet package folder)

0
Riegardt Steyn On

In the end, the following stackoverflow threads gave me the answer:

where is the tfs 2010 api dll microsoft teamfoundation framework server dll

what do i need to install to get microsoft teamfoundation workitemtracking client

The VS2015 dll's are not compatible with TFS 2013, so don't go looking for the dll's in Microsoft Visual Studio 14.0\ Common7 \ IDE !

You HAVE to install Team Explorer 2013 if you work against TFS 2013

It's small (just 130 MB), and it contains the correct DLLs.

After installation, you need to Browse... for the references here:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\ReferenceAssemblies
0
Wonder Wonder On

My case was that I needed to add NuGet reference directly in the test project (my custom attribute was situated in another project and dll was not copied to the test project).

0
RBT On

I'm posting this information w.r.t. Visual Studio 2017 in case it helps someone:

Please check whether you have 'Microsoft.WITDataStore32.dll' in the path below:

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

If not, please try to install team explorer for vs 2017 , download it from this blog:

https://blogs.msdn.microsoft.com/bharry/2017/04/05/team-explorer-for-tfs-2017/

Then find Microsoft.WITDataStore32.dll in team explorer folders and copy it to the path above.

Source: MSDN

0
Prasidh Shrivastava On

If you are getting Microsoft.WITDataStore32.dll issue while dealing with TFS/ VSTS ie. getting project name or fetching test case id in Visual Studio 2015 then you can simply redirect the Team Foundation dlls to version 12.0.0.0 from 14.0.0.0 as 14 version dlls create issue while retrieving such data and we use to get such error.

I have faced issue "Unable to load DLL 'Microsoft.WITDataStore32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)" while running my Coded UI test script after migration from "TFS 2012 and VS2013" to "VSTS and VS2015" respectively.

The issue got resolved when i redirected the referenced 14 versions dll to 12 version in the App config as shown below:

   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

     <dependentAssembly>
       <assemblyIdentity name="Microsoft.TeamFoundation.Common" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
       <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0"/>
     </dependentAssembly>

     <dependentAssembly>
       <assemblyIdentity name="Microsoft.TeamFoundation.TestManagement.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
       <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0"/>
     </dependentAssembly>

     <dependentAssembly>
       <assemblyIdentity name="Microsoft.TeamFoundation.WorkItemTracking.Client" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
       <bindingRedirect oldVersion="14.0.0.0" newVersion="12.0.0.0"/>
     </dependentAssembly>

   </assemblyBinding>

Regards, Prasidh