Repository: igor-petruk/scriptisto (language: rust)

Issue:
Add csharp template
I got a C# template on .NET working with scriptisto.

Is it ok if I do a pull request to add it?


Discussion / hints:
Yep, of course, thanks you!

Just to make sure, this will be for .NET Core only under Unix variants.
Yes, it's .NET core only under unix.

Fix patch:
diff --git a/data/templates/csharp.cs b/data/templates/csharp.cs
new file mode 100644
index 0000000..df23ded
--- /dev/null
+++ b/data/templates/csharp.cs
@@ -0,0 +1,27 @@
+#!/usr/bin/env scriptisto
+
+// scriptisto-begin
+// script_src: Program.cs
+// target_bin: bin/Release/net8.0/script
+// build_cmd: dotnet build -c Release script.csproj
+// files:
+//  - path: script.csproj
+//    content: |
+//      <Project Sdk="Microsoft.NET.Sdk">
+//        <PropertyGroup>
+//          <OutputType>Exe</OutputType>
+//          <TargetFramework>net8.0</TargetFramework>
+//          <ImplicitUsings>enable</ImplicitUsings>
+//          <Nullable>enable</Nullable>
+//        </PropertyGroup>
+//      </Project>
+// scriptisto-end
+
+// See https://aka.ms/new-console-template for more information
+
+var name = Environment.GetEnvironmentVariable("USER");
+Console.BackgroundColor = ConsoleColor.DarkBlue;
+Console.ForegroundColor = ConsoleColor.White;
+Console.Write("Hello");
+Console.ResetColor();
+Console.WriteLine($", {name}!");


Test patch: