When I execute my application all works well until it tries to execute the line:
teamProjectCollection.GetService<WorkItemStore>();
where it breaks with the error:
An exception of type 'System.DllNotFoundException' occurred in Microsoft.TeamFoundation.WorkItemTracking.Client.dll but was not handled in user code
Additional information: Unable to load DLL 'Microsoft.WITDataStore64.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
I know this is documented as seen in the stackoverflow question here and the microsoft response here, but I don't know how to actually implement the fix!
The microsoft response says:
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
And I do see in File Explorer that I can find Microsoft.WITDataStore64.dll in the path:
C:\Users\<user>\.nuget\packages\Microsoft.TeamFoundationServer.ExtendedClient\14.102.0\lib\native\amd64
except when I navigate to my application's bin folder, I already see the .dll there!
WorkerProjectName\bin\Debug\Microsoft.WITDataStore64.dll <-- already exists?!
So now I am stumped at what I am actually supposed to move to fix this issue. Any ideas?