Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
App
Library1
Library2
.gitignore
Directory.Build.targets
LICENSE
Maket.sln
README.md

README.md

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>

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

You can’t perform that action at this time.