Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ionide FSI fails to load Newtonsoft.Json assembly #1101

Open
aggieben opened this issue May 14, 2019 · 1 comment

Comments

Projects
None yet
1 participant
@aggieben
Copy link
Contributor

commented May 14, 2019

Describe the bug
FSI running in Ionide fails to load the Newtonsoft.Json assembly, which was referenced by paket-generated load scripts.

To Reproduce
Steps to reproduce the behaviour:

  1. Create new directory, initialize paket
  2. Add Akka.FSharp to paket.dependencies
  3. paket install
  4. paket generate-load-scripts -t fsx
  5. Create test.fsx with the content shown below
  6. Open test.fsx, and run the "FSI: Send File" (fsharp.fsacRuntime is set to netcore)
  7. Observe error (shown below)

test.fsx content:

#load ".paket/load/netstandard2.1/Akka.FSharp.fsx"

open Akka.Actor

let system = ActorSystem.Create("FSharp")

Error

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed'. The system cannot find the file specified.

   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture)
   at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   at Akka.Serialization.Serialization..ctor(ExtendedActorSystem system)
   at Akka.Actor.Internal.ActorSystemImpl..ctor(String name, Config config)
   at <StartupCode$FSI_0003>.$FSI_0003.main@()
Stopped due to error
> 

Expected behaviour
Following the steps 1-5, and then invoking #load "test.fsx" in standalone FSI (run as dotnet fsi), and the script succeeds.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: macOS 10.14.4
  • Ionide version: 3.37.0
  • VSCode version: 1.33.1
  • dotnet SDK version: 3.0-preview4 / preview5
  • mono / .Net Framework version: Mono 5.20.1.19
@open-collective-bot

This comment has been minimized.

Copy link

commented May 14, 2019

Hey @aggieben 👋,

Thank you for opening an issue. We will get back to you as
soon as we can. Also, check out our OpenCollective and consider
backing us.

https://opencollective.com/ionide

PS.: We offer backer support for all backers. Don't forget to add backer label when you start backing us 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.