question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Generated load scripts not working with dotnet fsi

See original GitHub issue

Description

It seems that generated load scripts do not work well with dotnet fsi.

Repro steps

  1. Check out this branch from Argu.
  2. Run dotnet tool restore && dotnet paket restore.
  3. Open dotnet fsi
  4. Type #load ".paket/load/netcoreapp3.1/DocGeneration/docgeneration.group.fsx" ;;

Expected behavior

Should load dependencies in context.

Actual behavior

Complains about missing framework assemblies:

.paket\load\netcoreapp3.1\DocGeneration\docgeneration.group.fsx(42,1): error FS0078: Unable to find the file 'System.ComponentModel.Composition' in any of
 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.1
 C:\Program Files\dotnet\sdk\3.1.101\FSharp\../../../packs/Microsoft.NETCore.App.Ref\3.1.0\ref\netcoreapp3.1
 C:\Users\eitsarpa\devel\public\Argu
 C:\Program Files\dotnet\sdk\3.1.101\FSharp\

Known workarounds

Manually delete framework assemblies loaded from script.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
vilinskicommented, Feb 10, 2020

I’m just here to say thank you! the way for scripting is free again

1reaction
inosikcommented, Feb 6, 2020

The filtering of framework assembly references doesn’t seem to work correctly:

$ rg -i 'system\.componentmodel\.composition' packages/docgeneration/
packages/docgeneration/System.Runtime\System.Runtime.nuspec
79:      <frameworkAssembly assemblyName="System.ComponentModel.Composition" targetFramework=".NETFramework4.5" />
80:      <frameworkAssembly assemblyName="System.ComponentModel.Composition" targetFramework=".NETFramework4.6.2" />

$ paket why -g docgeneration system.runtime
Paket version 5.242.0
NuGet system.runtime - 4.3.1 is a transitive dependency.
It is part of following dependency chains:

-> FSharp.Formatting - 4.0.0-alpha02
  -> FSharp.Compiler.Service - 33.0.1
    -> System.Diagnostics.Process - 4.3
      -> Microsoft.Win32.Primitives - 4.3
        -> system.runtime - 4.3.1

Performance:
 - Runtime: 976 milliseconds
Read more comments on GitHub >

github_iconTop Results From Across the Web

Load dotnet project files in F# Interactive
For example, in Visual Studio, you can right-click the project and select either "Send References to F# Interactive" or "Generate Script File ...
Read more >
F# Interactive (dotnet) Reference
Learn how F# Interactive (dotnet fsi) is used to run F# code interactively at the console or to execute F# scripts.
Read more >
How can I run tests from the fsi REPL? - General
If you're using Paket, there is a generate-load-scripts command which will generate scripts that load all the dependencies.
Read more >
NET Script APIs 🌞. with F# and dotnet fsi 🌴 | by jkone27
fsx app to load all the required assemblies to run aspnetcore in the interactive environment. If needed you can exclude this generated folder...
Read more >
Sending references to FSI -- best way? : r/fsharp
According to paket, the runtime for generate-load-scripts is 1 second. Running the netcore version of paket on ubuntu.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found