-
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
Make dotnet publish
use Release
by default in 8.0+ Projects
#29155
Make dotnet publish
use Release
by default in 8.0+ Projects
#29155
Conversation
…emaining p*release tests.
src/Assets/TestProjects/TestAppWithSlnUsingPublishReleaseConflictingValues/App.sln
Outdated
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.DotNet.PackageInstall.Tests/Microsoft.DotNet.PackageInstall.Tests.csproj
Show resolved
Hide resolved
src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
Show resolved
Hide resolved
…how that got there
…eting has been broken since at least net 5.0 so not doing that.
@dotnet/dotnet-cli Gentle ping reminder that this is available for review. Merge conflicts are just NETSDK Errors being added to the .resx in the time I was gone. |
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.
Good progress.
I think we are missing tests for publishing and packing solutions where the PublishRelease
or PackRelease
properties aren't specified but there's no conflict between projects. I think currently that will fail.
To get it to work I think we may need to move the default values for the properties back into the .targets files.
src/Assets/TestProjects/TestAppWithSlnUsingPublishReleaseConflictingValues/App/App.csproj
Outdated
Show resolved
Hide resolved
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.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
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
… of TFM to avoid multi-targeting multi-target sln
Waiting for Daniel to approve of the name but @AntonLapounov in this instance it means it will only evaluate one project in the solution for I will be updating/letting gewarren know to include this as soon as the name is agreed upon. |
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Publish.targets
Show resolved
Hide resolved
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets
Show resolved
Hide resolved
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
…and don't deny custom Configurations anymore.
…/nagilson/sdk into nagilson-publish-release-default
@dsplaisted I have responded to the feedback here. Thanks! |
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 made it through all the tests, but this is looking good so far.
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.props
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/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
Show resolved
Hide resolved
src/Tests/Microsoft.NET.Publish.Tests/GivenThatWeWantToPublishAHelloWorldProject.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
…ror message. Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
….) not actually sure why we are doing this one Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.NET.TestFramework/ProjectConstruction/TestSolution.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Outdated
Show resolved
Hide resolved
....Publish.Tests/GivenThatWeWantToTestAMultitargetedSolutionWithPublishReleaseOrPackRelease.cs
Show resolved
Hide resolved
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
Co-authored-by: Daniel Plaisted <dsplaisted@gmail.com>
…/nagilson/sdk into nagilson-publish-release-default
🎉 |
Changes:
dotnet publish (AND
dotnet pack
) use a configuration ofRelease
by default now if the TFM is above 8.dotnet pack
will useRelease
REGARDLESS*** of the TFM.The environment variables to opt in or out for solutions have been removed. The error before you'd get using them was tighter than the new error, and while you won't be warned you need to turn on the ENV var anymore, you just don't need to.
There's a new Environment variable that disables the features all-together called
DOTNET_CLI_DISABLE_PUBLISH_AND_PACK_RELEASE
<Configuration>
in a project file never worked to begin with. This no longer considers if you set<Configuration>
in your project file. Frankly, if that was supported, it would have dramatic consequences.If you multi-target with 8.0, I initially wrote it so you're going to get the
Release
behavior for each TFM indotnet pack
. No way to go around that besides making this an 8.0 SDK thing and not a TFM thing. FWIWdotnet publish
withTargetFrameworks
won't work so it picks whatever you used with-f
.