-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Allow skipping project fallback with file-based run #49808
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 introduces a --file
option to the dotnet run
command, allowing users to explicitly specify a file-based app to run and skip project fallback behavior. This addresses GitHub issue #49790 by providing a way to run file-based apps even when a project exists in the current directory.
Key changes include:
- Added new
--file
option to the run command with appropriate validation - Updated file-based app execution logic to use the new option format internally
- Added comprehensive test coverage for the new functionality
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
src/Cli/dotnet/Commands/Run/RunCommandParser.cs | Adds the new --file option definition |
src/Cli/dotnet/Commands/Run/RunCommand.cs | Implements logic for handling the --file option and validation |
src/Cli/dotnet/Program.cs | Updates file-based app parsing to use --file option format |
src/Cli/dotnet/Commands/CliCommandStrings.resx | Adds localization strings for the new option |
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs | Adds test coverage for the new functionality |
documentation/general/dotnet-run-file.md | Updates documentation to reflect the new option |
Multiple .xlf files | Adds localization entries for all supported languages |
Multiple completion snapshot files | Updates shell completion scripts |
@RikkiGibson @jaredpar for reviews, thanks |
@RikkiGibson @333fred for reviews, thanks |
Resolves #49790.