Skip to content

Support dotnet clean file.cs #49511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jjonescz
Copy link
Member

Part of #48250.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Jun 20, 2025
@jjonescz jjonescz marked this pull request as ready for review June 20, 2025 15:45
@jjonescz jjonescz requested review from Copilot and a team June 20, 2025 15:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the command "dotnet clean file.cs" to clean build artifacts for file-based programs and updates associated tests, command parsing, and documentation.

  • Updates test snapshots and schemas for new argument syntax for file-based programs.
  • Adds new tests and command paths to verify clean behavior using file-based entry points.
  • Enhances the VirtualProjectBuildingCommand with a NoBuildMarkers property and updates CleanCommand/API accordingly.

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/dotnet.Tests/CompletionTests/snapshots/zsh/DotnetCliSnapshotTests.VerifyCompletions.verified.zsh Updates command completion text to include file-based programs.
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Adds tests for cleaning file-based programs and verifies artifact deletion.
test/dotnet.Tests/CommandTests/MSBuild/GivenDotnetCleanInvocation.cs Updates CleanCommand invocation tests with appropriate casts.
test/dotnet.Tests/CliSchemaTests.cs Adjusts CLI schema to reflect the new argument naming and description.
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs Introduces NoBuildMarkers property and conditionally skips writing build markers.
src/Cli/dotnet/Commands/Clean/CleanCommandParser.cs Renames and adjusts arguments for enhanced file-based program support.
src/Cli/dotnet/Commands/Clean/CleanCommand.cs Updates command creation logic and return types for file-based commands.
documentation/general/dotnet-run-file.md Adds documentation for the new "dotnet clean file.cs" behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-run-file Items related to the "dotnet run <file>" effort
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy