An easily way to run your C# code without any namespace or entrypoint class/method.
It's very easy.
- Clone this repository into somewhere in your computer
- Compile it.
git clone git@github.com:supermomonga/QuickSharp.git path/to/QuickSharp
cd path/to/QuickSharp
dotnet restore
dotnet build -c Release
This will create dotnet-quicksharp.dll
in path/to/QuickSharp/Release/netcoreapp1.1/
.
Create .cs
file as you like. Here is example.
using System;
Console.WriteLine("Hello, World!");
Assuming this file is placed as ./sample.csx
, Only you need to execute this is to run following command.
dotnet [path/to/dotnet-quicksharp.dll] ./sample.csx
🎉 Tada! You'll see Hello, World!
text in stdout!