NuGet Package RProvider crashes build in F# by failing to link to RProvider.dll in JetBrains Rider

Viewed 88

Including the package "RProvider 1.1.20" in F# project throws a rather cryptic error:

Use build tool: C:\Program Files\dotnet\sdk\2.1.402\MSBuild.dll
0>------- Project started: OP 2 - rebuilt in Rider
0>FSC(0,0): Error FS3053: Der Typanbieter 'RProvider.RProvider' hat einen Fehler gemeldet: Der Typanbieterkonstruktor hat eine Ausnahme ausgelöst: Exception has been thrown by the target of an invocation.
0>FSC(0,0): Warning FS3005: Die referenzierte Assembly 'C:\Users\Wolfgang\.nuget\packages\rprovider\1.1.20\lib\net40\RProvider.dll' verfügt über das Attribut 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' auf Assemblyebene, es wurden jedoch keine öffentlichen Typanbieterklassen gefunden.
0>------- Project finished: OP 2 - rebuilt in Rider. Succeeded: False. Errors: 1. Warnings: 1

In English:

The referenced assembly "...RProvider.dll" has the attribute 'Microsoft.FSharp.Core.CompilerServices.TypeProviderAssemblyAttribute' on assembly level, but no public type provider classes were found.

And the shorthand error message is translated:

The type provider 'RProvider.RProvider' has reported an error: The type provider constructor has thrown an exception: Exception has been thrown by the target of an invocation.

Now that's pretty cryptic, no? Tried these to alleviate, but nothing worked:

  • Installed R as standalone application.
  • Used newest version of RProvider (1.1.21), but the error still remains, and moreover, it causes version conflicts with other packages (I don't list them cause I believe they contribute nothing to the problem)
  • Isolated the problem by creating a project with only the RProvider reference in, error remains the same.

It did work, however, when I was using Visual Studio (which just doesn't work right now on this machine). The problem came in JetBrains Rider.

Thank you very much for your help!

0 Answers
Related