Mark dependencies as private assets for GitVersion.MsBuild #3921
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
Change that all references of the msbuild package are marked as private assets, so they don't get added as dependency to the nuget package.
The dependecies field of the nuspec before the change:
and afer the change the dependencies of the nuspec look like this:
Related Issue
No, so far, happy to create one if the pr is not enough
Motivation and Context
The dependencies cause extra dll's to be published, for build only dependencies (
PrivateAssets="All"
). This problem seems to be cause by the change to the ceontral package management, whereSystem.Text.Json
was promoted to be included in theDirectory.Build.props
How Has This Been Tested?
Build locally and checked the generated nuspec file in the outpur directory.
Screenshots (if appropriate):
Checklist: