-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Don't include runtime config info during publish #49394
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -477,7 +477,8 @@ ProjectRootElement CreateProjectRootElement(ProjectCollection projectCollection) | |||||
| _directives, | ||||||
| isVirtualProject: true, | ||||||
| targetFilePath: EntryPointFileFullPath, | ||||||
| artifactsPath: GetArtifactsPath()); | ||||||
| artifactsPath: GetArtifactsPath(), | ||||||
| includeRuntimeConfigInformation: BuildTarget != "Publish"); | ||||||
|
||||||
| includeRuntimeConfigInformation: BuildTarget != "Publish"); | |
| includeRuntimeConfigInformation: BuildTarget != BuildTargets.Publish); |
Copilot
AI
Jun 13, 2025
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.
Add unit tests covering both paths of includeRuntimeConfigInformation (true and false) to verify the runtime config <ItemGroup> is correctly included or omitted. Use the Fact Skip parameter to reference issue #49368.
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.
Use a case-insensitive comparison when checking
BuildTargetto avoid unexpected mismatches. For example:!string.Equals(BuildTarget, "Publish", StringComparison.OrdinalIgnoreCase).