[DO NOT MERGE] Restore ability for users to consume the containers package easily #43794
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Users that try to use the NuGet package for containers with an SDK that already ships Containers support hit two main blockers that are difficult to work around for users that are not extremely skilled in MSBuild. We should enable users on 8.0 SDKs to use updated 8.0 packages for containerization to satisfy cases where users cannot update SDKs to the latest features.
This PR fixes two things:
Microsoft.NET.Build.Containers
package and sets_ContainersTargetsDir
(or it is set inside the package), a warning appears when runningdotnet publish -t:PublishContainer
that says:Solution:
_ContainersTargetsDir
was not set.Customer Impact
Without this, users cannot easily switch to using the Containers package - they get impossible to suppress warnings (which are errors if WarningsAsErrors is enabled) and some of the SDK logic will be pinned in a way that the Containers package cannot overwrite due to MSBuild semantics, so the experience of the user will be mixed.
Regression
Yes, we regressed the 'pluggability' aspect of the user experience in 8.0.200.
Risk
Low - we have excellent test coverage here and have added to it to check the semantics here.