Skip to content
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

Centrally manage NuGet dependencies and its versions #4181

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Nirmal4G
Copy link
Contributor

@Nirmal4G Nirmal4G commented Aug 15, 2021

Fixes #4180

  • Use Static Graph restore when applicable.
  • Manage Packages Centrally using NuGet's CPVM feature.

Know more about NuGet's Central Package Version Management (CPVM) feature.

PR Type

What kind of change does this PR introduce?

  • Feature
  • Refactoring (no functional changes, no API changes)
  • Build or CI related changes

What is the current behavior?

NuGet package references are spread across project files. It is difficult to track versions and upgrade them properly.

What is the new behavior?

Enables NuGet's upcoming feature to manage package versions centrally using Directory.Packages.props with the following item spec to store a package version.

  <ItemGroup>
    <PackageVersion Include="Vendor.Awesome.Package" Version="11.0.0" />
  </ItemGroup>

PR Checklist

Please check if your PR fulfils the following requirements:

  • Tested code with current supported SDKs
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

Other information

  • If you're editing this patch tree, please rebase on latest HEAD and then commit, without updating from the latest HEAD.
  • When merging, please update the commit title to PR title instead of the default Merge pull request #xxxx from repo/branch, and commit message to either PR message or messages of individual commits. The auto-merge bot does this by default.

@ghost
Copy link

ghost commented Aug 15, 2021

Thanks Nirmal4G for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker, azchohfi and Rosuavio August 15, 2021 13:26
@ghost ghost added the feature request 📬 A request for new changes to improve functionality label Aug 15, 2021
@Nirmal4G
Copy link
Contributor Author

The build failed, since, there's an issue with MSBuild.Sdk.Extras UWP implicit package reference. Thus, I'll be using a fork of the Extras SDK with fixes for this issue. I'll later patch the Extras SDK itself with those fixes!

@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch 4 times, most recently from a3e0d80 to 7110aee Compare August 15, 2021 23:32
nuget.config Outdated Show resolved Hide resolved
@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch 6 times, most recently from 48c7eb2 to 430b18b Compare August 22, 2021 12:16
@michael-hawker michael-hawker added this to the 7.2/8.0? milestone Aug 31, 2021
@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch 4 times, most recently from 4a34b2c to a501027 Compare September 2, 2021 15:12
@Nirmal4G
Copy link
Contributor Author

Nirmal4G commented Sep 9, 2021

I have extracted unrelated refactoring into its own PR: #4234; I'll rebase this on latest once the PR is merged.

@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch 4 times, most recently from 7823c50 to 1561c58 Compare December 2, 2021 12:41
@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch 9 times, most recently from 91dce2a to f49185c Compare April 23, 2022 11:32
@Nirmal4G Nirmal4G force-pushed the feature/nuget-cpvm branch from f49185c to 02feec9 Compare May 17, 2022 10:53
@Nirmal4G Nirmal4G requested review from michael-hawker and removed request for Rosuavio May 17, 2022 11:11
Renormalize new lines and remove BOM from new files
- Refactor Project files
- Refactor Markdown files
- Remove unnecessary files
- Use latest NuGet and config
- Fixup UAP/Windows TFM versions
The new Output paths point to...

Build: `~build\...`
Restore: `~build\ext`
Publish: `~publish\...`
Pack: `~packages\{bin,obj}`
Update package versions.
Use Static Graph restore when applicable.
Manage Packages Centrally using NuGet's CPVM feature.
Use "MSBuild.NET.Extras.Sdk" instead of "MSBuild.Sdk.Extras" for projects.
This replacement package contains fixes around UWP project setup and build!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 📬 A request for new changes to improve functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Build] Centrally manage NuGet package versions
2 participants