dotnet scripting / fsc compilation of .fsx scripts should package all the runtime dependencies along the compiled .exe
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
`fsc` support for compiling .fsx files could be improved by packaging all the runtime dependencies in the output folder, next to the compiled .exe.
**Describe the solution you'd like**
I'd like this to be the default behaviour, but since it would be a change of behaviour, maybe it would require a flag (`--copy-runtime-dependencies-to-output-folder` ?)
It should take care of those constructs:
* DependencyManager that are pulled through `#r "extension: "` mechanism
* vanilla `#r "Assembly"` directives
* #load "otherscript.fsx"
* more generally, all the HashDirective constructs that F# supports in scripts
**Describe alternatives you've considered**
Alternative is to make a new compiler out of FCS, that would do that, but it seems more cohesive to expand the support for compiling .fsx that is already implemented in `fsc`
**Additional context**
Related to https://github.com/dotnet/fsharp/issues/13236#issuecomment-1162153774
Related to https://github.com/dotnet/interactive
cc: @KevinRansom @jonsequitur
Contributor guide
Assessment
This issue has not been assessed yet.