Unable to load DLL Microsoft.WITDataStore32.dll, however DLL is in bin directory

1
Unable to load DLL 'Microsoft.WITDataStore32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

The other answers I see regarding this issue say that copying them to the bin directory is the solution. I clearly can see mine in the bin directory. I've uninstalled and reinstalled the TFS extended nuget package, cleaned, rebuilt, etc. just about 50 times now.

This error only occurs at runtime. The solution builds just fine.

Besides burning the whole thing to the ground what are some ways I could resolve this issue?

namespace (mynamespace)
{
    class TFSConnection
    {
        string tfsUrl = "(tfsurl)";
        string project = "(tfsProject)";
        public ITestManagementTeamProject GetProject()
        {
            TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(TfsTeamProjectCollection.GetFullyQualifiedUriForName(tfsUrl));
            ITestManagementService tms = tfs.GetService<ITestManagementService>();

            return tms.GetTeamProject(project);
        }
    }
}
c#
visual-studio
tfs
asked on Stack Overflow Mar 13, 2018 by Reed • edited Mar 13, 2018 by Reed

1 Answer

0

You can get the given exception even if the indicated file is actually there, but it's dependencies are not. If the package comes with more dlls (which I assume, because it seems to be a C# wrapper somehow), make sure these are also in the bin folder.

Unfortunately, if a native dll is missing, .NET will not tell you which one is missing, but instead return the name of the last managed DLL in the stack trace.

answered on Stack Overflow Mar 13, 2018 by PMF

User contributions licensed under CC BY-SA 3.0