Thinkmine.NetX.Framework 1.0.0-preview

This is a prerelease version of Thinkmine.NetX.Framework.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Thinkmine.NetX.Framework --version 1.0.0-preview
                    
NuGet\Install-Package Thinkmine.NetX.Framework -Version 1.0.0-preview
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Thinkmine.NetX.Framework" Version="1.0.0-preview" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Thinkmine.NetX.Framework" Version="1.0.0-preview" />
                    
Directory.Packages.props
<PackageReference Include="Thinkmine.NetX.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Thinkmine.NetX.Framework --version 1.0.0-preview
                    
#r "nuget: Thinkmine.NetX.Framework, 1.0.0-preview"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Thinkmine.NetX.Framework@1.0.0-preview
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Thinkmine.NetX.Framework&version=1.0.0-preview&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Thinkmine.NetX.Framework&version=1.0.0-preview&prerelease
                    
Install as a Cake Tool

NetX

Release Notes Version 1.0.0-preview

This is a preview version of NetX focused on exploring functionality, usage scenarios, and feasibility. While all commands have been tested, all error conditions have not been encountered.

Why netx

With the release of .NET 10 comes a powerful new feature to C#, dotnet run file. This capability in the new .NET build toolchain lets us run C# files directly from the dotnet run command. This means that we can easily execute functionality, using C#, in a manner very similar to writing scripts.

Of course there are still a number of differences, as C# even though extremely powerful is quite verbose in comparison to the needs of a script. This is obviously because it is designed primarily to be a language for building applications.

With the netx nuget and additional toolkit we make it easy for you to execute the most common script tasks by exposing those capabilities to you in a manner that can be easily leveraged for automation and general purpose scripting. netx offers the best of both worlds as you can seamlessly switch between top-down scripts and more sophisticated coding all in the same document.

Here is what a sample netx script looks like. Assuming this file was called dostuff.cs you can run this code and execute this functionality dotnet run dostuff.cs

//#:package NetX@1.0.0-preview
using static netx;

exec("dir");
exec("echo hello");
pwd();
cd("../../..");
rename("test.txt", "helloworld.txt");
list();
copy("bin", "test");
list();
pwd();
copy("program.cs", "c:/temp", true, "hello.cs");
pack("c:/temp", "temp.zip");
list();
unpack("temp.zip", "destination");
delete("temp.zip");
delete("destination");
delete("test");

Basic commands

netx currently has 14 commands you can perform with it. The table below provides instructions on what they are and how to use them.

Command Sample Description
pwd pwd() Prints the current working directory to the console.
cd cd(<folder name>) Changes the current working directory to the one specified in the argument
list list() Lists all contents in the current folder
copy copy(<source>,<destination>) Copies a file or folder from source to destination
delete delete Deletes a file or folder
pack pack(<folder>,<zip file>) Zips a folder
unpack unpack(<file>,<folder>) Unzips a zip file to a folder
print print(<text>) Prints the specified text to the console
run run(<executable>) Runs an executable. The file must be in the current working folder or in the global path
exec exec(<command>) Executes a console command as if it was typed in and run directly in the console. This can be used do "ls", "dir", etc.
http_get http_get(<url>) Makes an HTTP GET call to the endpoint provided
http_post http_post(<url>,{object}) Makes an HTTP POS call to the endpoint provided, passing in an object as the payload. The object will be converted to json before being sent.

Advanced commands

Documentation coming soon.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.12-preview 148 9/15/2025
1.0.11-preview 143 9/15/2025
1.0.9-preview 142 9/14/2025
1.0.8-preview 143 9/14/2025
1.0.6-preview 94 9/14/2025
1.0.5-preview 90 9/12/2025
1.0.4-preview 117 9/12/2025
1.0.3-preview 102 9/12/2025
1.0.2-preview 108 9/12/2025
1.0.1-preview 106 9/12/2025
1.0.0-preview 112 9/12/2025