Skip to content

Add --file and --startup-file options#38186

Merged
AndriySvyryd merged 2 commits into
dotnet:mainfrom
jjonescz:fba-2
Apr 28, 2026
Merged

Add --file and --startup-file options#38186
AndriySvyryd merged 2 commits into
dotnet:mainfrom
jjonescz:fba-2

Conversation

@jjonescz
Copy link
Copy Markdown
Member

@jjonescz jjonescz commented Apr 28, 2026

Resolves #38159.

  • I've read the guidelines for contributing and seen the walkthrough
  • I've posted a comment on an issue with a detailed description of how I am planning to contribute and got approval from a member of the team
  • The code builds and tests pass locally (also verified by our automated build checks)
  • Commit messages follow this format:
        Summary of the changes
        - Detail 1
        - Detail 2

        Fixes #bugnumber
  • Tests for the changes have been added (for bug fixes / features)
  • Code follows the same patterns and style as existing code in this repo

Copilot AI review requested due to automatic review settings April 28, 2026 11:44
@jjonescz jjonescz requested a review from a team as a code owner April 28, 2026 11:44
Copy link
Copy Markdown

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

Adds --file and --startup-file options to dotnet-ef, aligning option naming with file-based apps usage while keeping existing --project / --startup-project behavior. This primarily affects how the tool resolves project/startup inputs and how those options are described in help text/resources.

Changes:

  • Introduced --file / --startup-file options and routed them through project/startup path resolution.
  • Added mutual-exclusion validation between the primary options and their new aliases.
  • Updated/added localized resource strings and generated designer accessors for the new option descriptions and error message.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/dotnet-ef/RootCommand.cs Adds new option wiring and ResolveOption helper enforcing mutual exclusivity and resolution precedence.
src/dotnet-ef/ProjectOptions.cs Defines the new --file and --startup-file command-line options.
src/dotnet-ef/Properties/Resources.resx Adds descriptions for new options and a new mutually-exclusive-options error message; updates existing option descriptions.
src/dotnet-ef/Properties/Resources.Designer.cs Adds strongly-typed accessors for the new resource strings.
Files not reviewed (1)
  • src/dotnet-ef/Properties/Resources.Designer.cs: Language not supported

Comment thread src/dotnet-ef/RootCommand.cs
@AndriySvyryd AndriySvyryd merged commit de10077 into dotnet:main Apr 28, 2026
28 checks passed
@AndriySvyryd
Copy link
Copy Markdown
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --file and --startup-file options to dotnet-ef

3 participants