Skip to content

Add property FileBasedProgram #49861

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

Merged
merged 1 commit into from
Jul 22, 2025
Merged

Add property FileBasedProgram #49861

merged 1 commit into from
Jul 22, 2025

Conversation

jjonescz
Copy link
Member

Resolves #49846.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label Jul 18, 2025
@jjonescz jjonescz marked this pull request as ready for review July 18, 2025 14:23
@Copilot Copilot AI review requested due to automatic review settings July 18, 2025 14:23
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 a new MSBuild property FileBasedProgram that is set to true for file-based programs to enable SDK targets to detect and handle file-based applications differently from traditional project-based applications.

  • Adds <FileBasedProgram>true</FileBasedProgram> property to virtual project files generated for file-based programs
  • Updates test files to include the new property in their expected project content
  • Documents the new property in the dotnet-run-file documentation

Reviewed Changes

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

File Description
src/Cli/dotnet/Commands/Run/VirtualProjectBuildingCommand.cs Adds FileBasedProgram property to generated virtual project files
test/dotnet.Tests/CommandTests/Run/RunFileTests.cs Updates test expectations to include the new property
documentation/general/dotnet-run-file.md Documents the FileBasedProgram property for users

@jjonescz jjonescz requested a review from a team July 18, 2025 14:23
@jjonescz jjonescz requested a review from MiYanni July 21, 2025 09:35
@jjonescz jjonescz merged commit 6f7ba0f into dotnet:main Jul 22, 2025
30 checks passed
@jjonescz jjonescz deleted the sprint-prop branch July 22, 2025 07:21
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.

Add an MSBuild property to indicate that a project is a file-based app
4 participants