LINQPad 5 fails to load native Microsoft.WITDataStore64.dll from Nuget package
Hi,
I wanted to switch from referencing libraries in some VisualStudio folders, that change between versions and types of VS, to Nuget package. There is Microsoft.TeamFoundationServer.ExtendedClient package that has all needed dlls and it works, mostly.
What doesn't work is using WorkItemStore that has reference to the native library: Microsoft.WITDataStore64.dll.
I cannot add a reference to it in the script as it fails with lack of metadata. It is not copied to the shadow folder.
The only way I managed to make it work with LINQPad is to copy it the the folder where other .NET libraries are located and disable shadow copy.
I can live with that but it's a PITA .
Comments
This occurs because the native libraries are located in a non-standard folder in that package. And unfortunately, there appears to be no .NET Core version of it (unless they've renamed the package).
What is the standard location? If I create that folder and copy the dlls there, should it work?
The correct folder structure for NuGet packages is described here:
https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks
Note that you will need to create and publish a new NuGet package with the correct folder structure. You can't change the folders after the package has been downloaded because LINQPad will have already read and cached the files.