← スキル一覧に戻る
name: dotnet-runfile
description: How to use the .NET 10

dotnet-runfile
by j-r-beckett
⭐ 0🍴 0📅 2026年1月6日
SKILL.md
name: dotnet-runfile
description: How to use the .NET 10 dotnet run app.cs feature. Use this skill when you need to run an existing single-file C# script, create a new C# script, run an ad-hoc C# script (e.g. to test the behavior of a C# snippet), or work on an existing C# script already in the repo. Covers how to run C# scripts and their syntax.
dotnet run app.cs
Run C# files directly without .csproj project files. Requires .NET 10 (SpeedReader uses .NET 10, so this should already be installed).
dotnet run hello.cs
Usage Examples
#!/usr/bin/env dotnet run // shebang (unix)
#:sdk Microsoft.NET.Sdk // sdk (default; also .Web, .Worker)
#:package Humanizer@2.14.1 // nuget package (version required, wildcards ok)
#:property LangVersion=preview // msbuild property
#:project ../src/MyLibrary // project reference
Console.WriteLine("Hello, World!");
dotnet run hello.cs # run
dotnet run hello.cs -- arg1 arg2 # run with args
chmod +x hello.cs && ./hello.cs # run via shebang
cat hello.cs | dotnet run - # run from stdin
dotnet publish hello.cs -c Release # publish
dotnet project convert hello.cs # convert to full project w/ csproj
Shared Configuration
Share settings across multiple single-file apps by placing a Directory.Build.props file in the same or parent directory:
<Project>
<PropertyGroup>
<LangVersion>preview</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
</Project>
All .cs files in that directory tree inherit these settings.
スコア
総合スコア
60/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です