4 ms·
You can also use shebang to run C# scripts like bash scripts https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-app/#using-shebang-lines-for-shell-scri
by wiso 1y ago
You can also use shebang to run C# scripts like bash scripts https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-app/#using-shebang-lines-for-shell-scripts https://devblogs.microsoft.com/dotnet/announcing-dotnet-run-...
- max23_ 1y agoI couldn't get the shebang to work by running the file directly with .net10 preview 4 sdk image. It works if I run `dotnet run <file>`. Update: It is working now, the file was using CRLF instead of LF.
- bouke 1y agoThat's great; now I can finally have scripts with type-safety. Note that on macOS the shebang either reads `#!/usr/local/share/dotnet/dotnet run` or `#!/usr/bin/env -S dotnet run`.