I'm trying to find a simple solution that isn't so much manual work to reference packages. inside a .fsx file.
LinqPad 4
lets me simply add nuget packages
LinqPad 5 beta
lets me add nuget packages
VS2015
doesn't let you download/install packages for an fsx file (only into projects)VSCode
doesn't let you download/install nuget or paket packages for an fsx file.So I wind up having to use .fsx in VS2015, while using linqpad to get packages downloaded (which still fails for packages like templatus where it downloads an exe not a dll). Then I have I can reference them as
#I @"..\LINQPad\NuGet.FW46\FParsec\FParsec.1.0.2\lib\net40-client\" // references AppData\local\ ... since . is %localappdata%\TEMP
I don't want to create a project. I have a ton of individual scripts that are to be individually maintained and usable by others on-demand.
Is there an IDE (or fix/extension for one of these mentioned) that will give me intellisense, autocomplete, and package management for F# .fsx files that can work easily from user to user, machine to machine?
The Ionide plugins for VsCode and Atom have the functionality you're looking for
Use the command palette to install the Ionide extensions ionide-fsharp and ionide-paket
You'll need to add your F# installation to your PATH
(on windows Rapid Enivornment Editor is my goto for PATH
editing)
For F# 4.0 add C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0
Open the work folder that will hold your .fsx
files
Executing paket commands through the command palette will be your primary interface for working with nuget packages
make a new .fsx
file, (I recommend using the Advanced New File extension over the standard VsCode method)
The first step is to run paket init
which is necessary to use paket to manage your packages
If you click the open
button on the notification popups you can view the the output from paket in a side panel
After using the add nuget package
command and entering extcore
for the package you should see the work tree
updated to
Then all you need to do is reference the package in the script and you'll get the auto-completion you're looking for
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With