Adding packages is `dotnet add package {PackageName}`. That's it.
Worrying about version compatibility for new projects has stopped being an issue. The package either targets NS2.0 or whatever latest LTS currently is, in which case you just add its reference, or it doesn't in which case you use something else.
If it does, in 98% situations it just works. In the last 2% it has native dependencies which means either a) the package ships with binaries built for all popular platforms, b) the package adds a platform-specific dependent package automatically, or manually and mentions that in README (either with dotnet add package or system-wide library, apt-get install and friends), or c) the package comes with windows only native dll, which happens with ancient unmaintained packages, it's a rare case nowadays fortunately.
As someone whose primary PL is C#, I found https://github.com/waf/CSharpRepl and https://github.com/dotnet-script/dotnet-script far more accessible and useful. Compilation caching for the latter works relatively well to make startup latency tolerable for using it for writing scripts over Python. It's not the smoothest ride, but the advantages of C# make up for this.
Or I just do `dotnet new console -o MyScriptName --aot`, echo code into Program.cs and `dotnet publish -o .` it. Some do that with Rust as well. Especially useful if you need your script to go through a lot of data quickly and parallelize that well too.
Worrying about version compatibility for new projects has stopped being an issue. The package either targets NS2.0 or whatever latest LTS currently is, in which case you just add its reference, or it doesn't in which case you use something else.
If it does, in 98% situations it just works. In the last 2% it has native dependencies which means either a) the package ships with binaries built for all popular platforms, b) the package adds a platform-specific dependent package automatically, or manually and mentions that in README (either with dotnet add package or system-wide library, apt-get install and friends), or c) the package comes with windows only native dll, which happens with ancient unmaintained packages, it's a rare case nowadays fortunately.
As someone whose primary PL is C#, I found https://github.com/waf/CSharpRepl and https://github.com/dotnet-script/dotnet-script far more accessible and useful. Compilation caching for the latter works relatively well to make startup latency tolerable for using it for writing scripts over Python. It's not the smoothest ride, but the advantages of C# make up for this.
Or I just do `dotnet new console -o MyScriptName --aot`, echo code into Program.cs and `dotnet publish -o .` it. Some do that with Rust as well. Especially useful if you need your script to go through a lot of data quickly and parallelize that well too.