Hi,
The R provider faces exactly this issue (it depends on R.NET). The way we solve it is that we register handler for the AssemblyResolve event handler (before anything causes loading of R.NET types) and look for the reference (using the expected NuGet/Paket folder structure).
The relevant place in the code is here:
There is also more documentation on how this works here:
http://bluemountaincapital.github.io/FSharpRProvider/devnotes.html
Note that to make this work, the library that sets up the AssemblyResolve handler must not contain any types that would require loading anything from the dependency (in our case, nothing from R.NET). AFAIK, this just means you shouldn’t have a public type inheriting from anything from R.NET (but I may be wrong here – we basically have all complex runtime in a separate assembly, partly for this reason).
Hope this helps! (And yes, it is a bit messy.. we also experimented with adding PowerShell script to copy the DLLs when NuGet packages are installed, but this does not work – restore packages in Visual Studio does not run the PowerShell script and it was fairly unpredictable anyway).
Tomas
From: fsharp-o...@googlegroups.com [mailto:fsharp-o...@googlegroups.com] On Behalf Of Adam Granicz
Sent: Thursday, April 9, 2015 9:56 PM
To: fsharp-o...@googlegroups.com
Subject: Type providers with Nuget dependencies
Hi guys,
--