My F# type provider doesn't seem to be working unless all its dependencies are in the same folder. This doesn't work very well for distributing type providers via nuget. Any suggestions on how to resolve this?
I'll get errors like: error FS3033: The type provider 'Froto.Gen.ProtoTypeProvider' reported an error: Could not load file or assembly 'Froto.Roslyn, Version=0.0.0.1, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
The type provider is in this library: packages\Froto.Gen.0.0.0.1\lib\net45\Froto.Gen.dll
The dependencies are all in the project. If I copy all of them into packages\Froto.Gen.0.0.0.1\lib\net45\, the type provider works.
2012-11-19 Update: I'll create a NuGet package today to explain the problem better.
This issue is not F# specific. You absolutely have to either
A nuget package can easily contain multiple dlls (if packaged correctly). You can read more abou how to create a package here: http://docs.nuget.org/docs/creating-packages/creating-and-publishing-a-package
Should you have trouble integrating NuGet with your projects msbuild scripts, I recommend taking a look at the scripts other open source projects use to build their NuGet packages (e.g. check out FSharpX or FSharp Power Pack).
There was a similar problem with FSharpx.TypeProviders that dependend on FSharpx.Core. The solution was to use ILMerge to merge all the dependencies into the type provider. Check the thread in https://github.com/fsharp/fsharpx/issues/91
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With