Skip to content

Start Debugging

Start Debugging

dotnet script

.NET | dotnet script

How to install dotnet script

ByMarius Bughiu August 29, 2023November 5, 2023

dotnet script enables you to run C# scripts (.CSX) from the .NET CLI. The only requirement is to have .NET 6 or newer installed on your machine. You can use the following command to install dotnet-script globally: Then to execute a script file you simply call dotnet script <file_path> like in the example below: How…

Read More How to install dotnet scriptContinue

dotnet script

How to pass arguments to a dotnet script

ByMarius Bughiu June 12, 2023November 5, 2023

When using dotnet script you can pass arguments by specifying them after — (two dashes). You can the access the arguments in the script using the Args collection. Let’s take an example. Assume we have the following myScript.csx script file: We can pass parameter to this script as follows:

Read More How to pass arguments to a dotnet scriptContinue

© 2025 Start Debugging - Privacy policy

Go to mobile version