Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Run file-based C# apps with the .NET CLI when the user explicitly wants C#/.NET code without creating a project.
36% 96%+60 ptsof test cases passed
Passed 24 of 25 test cases with the skill, and 9 of 25 without it.
I've been running my file-based app `tool.cs` repeatedly and want to clear out all cached build artifacts generated by running it. What command should I execute?
The response specifies the command dotnet clean tool.cs.
3 of 3 safety checks passed
.cs files.csproj| Input | Required | Description |
|---|---|---|
| C# code or intent | Yes | The code to run, or a description of what the file-based app should do |
Run dotnet --version to verify the SDK is installed and note the full version, including the feature band. File-based apps require .NET 10 or later. #:include, #:exclude, and transitive directive processing require SDK 10.0.300 or later; SDK 10.0.100/10.0.200 builds can run single-file apps but do not support those multi-file directives. If the version is below 10, follow the fallback for older SDKs instead.
Create an entry-point .cs file using top-level statements. Place it outside any existing project directory to avoid conflicts with .csproj files.
#!/usr/bin/env dotnet
// hello.cs
Console.WriteLine("Hello from a file-based app!");
var numbers = new[] { 1, 2, 3, 4, 5 };
Console.WriteLine($"Sum: {numbers.Sum()}");
Next to this one in the catalogue, plus more from the same author.