Hi,
I am very new to the .net world, as a development platform
But I used Perl5 and CPAN in the past, is this is what I am comparing to
At a high level (and honestly I only understand it at a high level)
For Perl, you can have multiple Perl interpreters installed on your computer
but usually only one active Perl interpreter, or you can usually execute just one depending on how you configured your Path
When you use CPAN, it installs a Package for that active Perl interpreter,
if you are using a brew like environment and want to use a package, you usually need to install it again for that interpreter
And if you distribute a script, usually you upload it to CPAN, and configure your script in package, and if anyone want to use your script, he can download it from CPAN, which will in turn make sure that all the dependencies are installed
If uploading to CPAN is not an option, you can create a simple custom script, that run some CPAN command that will install the dependencies and ask your script user to make sure to install all the dependencies before running your script
Also if your script user doesnt have Perl at all installed, you can use tools like Par Packer, to package a Perl interpreter and all the dependencies and and your script all in one executable
Sorry for the long Perl intro, but, again, this is what I am comparing to
Now, coming to .Net, and I am focused on .Net core, since its portable, and seems to be recommended even on windows for new stuff
Using the dotnet command it seems
I can install packages, but it seems that at this requires to be done within the context of a project
I am not really sure where the packages are installed, or if they are shared, and I am not even sure how can this work if you have multiple dotnet version on your computer
But, it doesnt seem that you just install a package to be used by scripts that are not in a project
It doesnt seem that scripting, is supported as a first class use case by the dotnet core framework
How can I install a package for usage within a script?
Where is the package installed?
How can reference it? i know about the #I and #r directives, but I think I need to know where a package is installed to use them (you dont have to know where exactly CPAN installed a Perl package to use it, you just need to make sure Perl have the packages path configured properly)
And how can I shared my script? How should my use install the dependencies
I can of course just create a project
And I can just switch to PowerShell for scripting
But I want to know how it can be done in F#