Skip to content

Conversation

jjonescz
Copy link
Member

@jjonescz jjonescz commented Sep 8, 2025

Fixes #50528.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Sep 8, 2025
@jjonescz jjonescz marked this pull request as ready for review September 8, 2025 16:15
@jjonescz jjonescz requested a review from a team as a code owner September 8, 2025 16:15
@jjonescz jjonescz requested review from a team and Copilot September 8, 2025 16:16
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 changes the default configuration for publishing and packing file-based applications from Debug to Release, addressing issue #50528. The change ensures that file-based apps (single C# files) are built in Release mode by default when using dotnet publish and dotnet pack commands.

  • Updates publish and pack commands to use Release configuration by default for file-based apps
  • Modifies the command factory to support MSBuild argument transformation
  • Updates ReleasePropertyProjectLocator to handle virtual projects for file-based apps

Reviewed Changes

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

Show a summary per file
File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Updates test expectations to verify Release configuration output
src/Cli/dotnet/ReleasePropertyProjectLocator.cs Adds support for detecting and handling file-based virtual projects
src/Cli/dotnet/Commands/Publish/PublishCommand.cs Refactors to use the new command factory pattern with MSBuild argument transformation
src/Cli/dotnet/Commands/Pack/PackCommand.cs Refactors to use the new command factory pattern with MSBuild argument transformation
src/Cli/dotnet/Commands/CommandFactory.cs Adds MSBuild argument transformation capability to support Release mode defaults

@jjonescz
Copy link
Member Author

@RikkiGibson @MiYanni for reviews, thanks

@jjonescz jjonescz merged commit 0439a83 into dotnet:release/10.0.1xx Sep 16, 2025
27 checks passed
@jjonescz jjonescz deleted the sprint-publish-release branch September 16, 2025 06:46
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.

4 participants