GitXplorerGitXplorer
d

maket

public
42 stars
3 forks
2 issues

Commits

List of commits on branch master.
Verified
03456c97223da00fe5dc52d99617d3a5c3a14e92

Initial commit

ddavkean committed 7 years ago

README

The README file for this repository.

maket

This repository shows an example of controlling NuGet package versions at the repository level, while at the same time ensuring that projects only opt into packages that they want.

Packages are opt'd in as normal via a <PackageReference> in each project just without a version:

  <ItemGroup>
    <PackageReference Include="Newtonsoft.Json" />
  </ItemGroup>

Package versions across the repository (or solution) are then controlled by the <PackageReference Update=""/> constructs (new for MSBuild 15) inside of Directory.Build.targets:

  <ItemGroup>
    <PackageReference Update="Newtonsoft.Json" Version="10.0.1"/>
    <PackageReference Update="EntityFramework" Version="6.1.2"/>  
  </ItemGroup>

This says, "if a project has Newtonsoft.Json or EntityFramework in their list of packages, update them to this version".

You can read more information about Directory.Build.props/Directory.Build.targets in Customize your build.