-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow Opt-In to change the default to Release for Pack/Pub #25991
Conversation
This reverts commit 9f68df6.
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
src/Cli/dotnet/commands/dotnet-tool/update/xlf/LocalizableStrings.cs.xlf
Outdated
Show resolved
Hide resolved
These unrelated tests, and some centered around it, fail here, but they are also failing on main. Should probably make an issue for that? Discussed that it's OK to review this nonetheless.
|
@joeloff If there is a concern with this breaking VS Publish, please reach out to me to discuss. |
I'll let @vijayrkn weigh in on this, but I think VS should be fine. In VS, the publishing wizard usually lets you choose the configurations and I believe it is also stored in the profile. The wizards usually trigger a solution build programmatically and should be passing a value for the |
Ok, the feature is opt-in now instead of by default. If the build succeeds and no more tests need to be fixed, would appreciate a final review before merging. Shall I also raise a PR reflecting this change here: docs/msbuild-props.md at main · dotnet/docs (github.com) ? |
LGTM ... Yes, a PR on docs would be great. Thanks! |
@@ -15,12 +15,14 @@ Copyright (c) .NET Foundation. All rights reserved. | |||
<!-- This property disables the conflict resolution logic from the Microsoft.Packaging.Tools package, which is superceded by the logic here in the SDK --> | |||
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts> | |||
</PropertyGroup> | |||
|
|||
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.
nit: can you remove the extra space?
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.
Yes, thanks for the call here on these artifacts.
I installed this extension now https://marketplace.visualstudio.com/items?itemName=mynkow.FormatdocumentonSave&ssr=false#overview so these artifacts of removed changes shouldn't reoccur. Sadly there were some problems elsewhere in the file that also got changed. Not sure if that's going to be annoying in the future if my auto-formatter is fixing the format of code that's in the same file but not relevant to my changes? (IMO it's better to fix the formatting everywhere if the file is being touched anyways, but will make the PRs uglier)
src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs
Outdated
Show resolved
Hide resolved
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.
There are a few files where the only changes are whitespace, like the Publish.targets and WebSdk Publish props. Can you revert those whitespace-only changes to minimize diffs/reduce visual clutter?
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.
I haven't been involved in the recent conversations around this, but I don't get what's going on here. With this PR, it looks like if you set PackRelease
or PublishRelease
to true, then all builds (whether doing a pack, publish, or a normal build) will be set to release by default.
Is this the intention? I would expect that if you set PublishRelease
to true, that would change the default configuration for publish, but non-publish builds would still use Debug.
Code cleanup Fix whitespace issues Fix whitespace again [SQUASHED] Code Cleanup Changes
dba7e4c
to
a81c83d
Compare
Resolved |
@dsplaisted -- That is indeed the intention. |
src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.NET.Pack.Tests/GivenThatWeWantToPackAHelloWorldProject.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
Outdated
Show resolved
Hide resolved
src/Tests/dotnet-publish.Tests/GivenDotnetPublishPublishesProjects.cs
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets
Outdated
Show resolved
Hide resolved
@richlander Note that as it currently stands, Same thing goes for |
Yep, called that out here: #23551 (comment) |
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
… into nagilson-papurelease2
* The pack property was included here because it is specific to the SDK and not part of MSBuild. Reflects the changes we're adding here dotnet/sdk#25991
Any way to set this would certainly be an improvement, but will it not be a cause of confusion having them acting differently? |
Fix for #23551 (comment). Drafting until unit tests are added to assure this works. Fixes the issue, but unlike the fix in this PR #25926 it adds a property through MSBuild.
A concern: