fslaborg / RProvider

Access R packages from F#
http://fslab.org/RProvider/
Other
235 stars 69 forks source link

RProvider does not work when 'Shadow copy assemblies' is TRUE #125

Closed sergey-tihon closed 9 years ago

sergey-tihon commented 9 years ago

New FSI has has new config option Shadow copy assemblies that is True by default. image When this option is in True state RProvider fails with following error

FsLab.fsx(51,1): error FS3053: The type provider 'RProvider.RProvider' reported an error: The type provider constructor has thrown an exception: The system cannot find the file specified

ghost commented 9 years ago

I have a fix for this, it is where the type provider relies on GetEntryAssembly() to figure out where stuff is loading from. The way we start the appdomain, this api returns null, My fix starts the app domain slightly differently and the api returns the assembly instead. I think I would regard this a CLR bug, but since it has worked the way it does forever, it seems unlikely to be changed.

sergey-tihon commented 9 years ago

As @Codecutter mentioned on the twitter, there is an issue in Visual F# backlog for this bug.

P.S. This behavior is very similar to the bug I have found with .NET Reflector extension for VS, that also copied assemblies behind the scene.

damageboy commented 9 years ago

This was originally opened by me: #122 It was also fixed by me, with pull request: #124 Would be nice to get this merged by the RProvider gods I'd also mark this as duplicate while at it.

KevinRansom commented 9 years ago

This will not be fixed by my changes to FSI. This failure occurs because shadowcopy moves files to a different location. You should use the CodeBase property to find the original file location.

tpetricek commented 9 years ago

Closed via #124