Skip to content

File-based apps: support #:include .dll by default#54396

Open
jjonescz wants to merge 4 commits into
dotnet:release/10.0.4xxfrom
jjonescz:sprint-include-dll
Open

File-based apps: support #:include .dll by default#54396
jjonescz wants to merge 4 commits into
dotnet:release/10.0.4xxfrom
jjonescz:sprint-include-dll

Conversation

@jjonescz
Copy link
Copy Markdown
Member

No description provided.

@jjonescz jjonescz added the Area-run-file Items related to the "dotnet run <file>" effort label May 21, 2026
Copy link
Copy Markdown
Contributor

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 updates file-based apps support so that #:include directives targeting .dll files work out-of-the-box by mapping .dll to the MSBuild Reference item type in the default include/exclude mapping.

Changes:

  • Extend the default FileBasedProgramsItemMapping to include .dll=Reference.
  • Update run-api expected virtual project output to reflect the new default mapping.
  • Simplify dotnet project convert tests by removing now-unnecessary .dll mapping directives, and adjust one test to explicitly clear the mapping to preserve the “no mapping” scenario.

Reviewed changes

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

File Description
test/dotnet.Tests/CommandTests/Run/RunFileTests_CscOnlyAndApi.cs Updates expected run-api virtual project XML to include .dll=Reference in the mapping.
test/dotnet.Tests/CommandTests/Project/Convert/DotnetProjectConvertTests.cs Removes explicit .dll mapping setup in tests that now rely on the default mapping; adds an explicit empty mapping for the “no mapping” case.
src/Cli/Microsoft.DotNet.FileBasedPrograms/FileLevelDirectiveHelpers.cs Adds .dll=Reference to the default mapping and adjusts mapping parsing behavior.

@jjonescz
Copy link
Copy Markdown
Member Author

@333fred @RikkiGibson for reviews, thanks

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.

3 participants