• Nick Craver's avatar
    Centralized package versioning with Directory.Packages.props (#1421) · f798868d
    Nick Craver authored
    Explicitly didn't do `/toys` here because the versions aren't shared but if it makes sense: yeah let's add em. This structure is made for easier migration to https://github.com/NuGet/Home/wiki/Centrally-managing-NuGet-package-versions later (we should just need to remove the manual import in each project file (necessary for ordering):
    ```xml
    <Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Packages.props', '$(MSBuildThisFileDirectory)../'))" />
    ```
    
    If you're wondering why `Directory.Build.targets` doesn't work - I'm not sure. It's fine for `netcoreapp*` builds, but .NET Full framework throws a fit:
    ```
    C:\git\StackExchange\StackExchange.Redis\tests\NRediSearch.Test\NRediSearch.Test.csproj : error NU1701: Package 'xunit 1.7.0.1540' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project. [C:\git\StackExchange\StackExchange.Redis\Build.csproj]
    C:\git\StackExchange\StackExchange.Redis\tests\BasicTestBaseline\BasicTestBaseline.csproj : error NU1604: Project dependency BenchmarkDotNet does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. [C:\git\StackExchange\StackExchange.Redis\Build.csproj]
    C:\git\StackExchange\StackExchange.Redis\tests\BasicTest\BasicTest.csproj : error NU1604: Project dependency BenchmarkDotNet does not contain an inclusive lower bound. Include a lower bound in the dependency version to ensure consistent restore results. [C:\git\StackExchange\StackExchange.Redis\Build.csproj]
    C:\git\StackExchange\StackExchange.Redis\tests\BasicTest\BasicTest.csproj : error NU1701: Package 'BenchmarkDotNet 0.5.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target
    framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [C:\git\StackExchange\StackExchange.Redis\Build.csproj]
    C:\git\StackExchange\StackExchange.Redis\tests\BasicTestBaseline\BasicTestBaseline.csproj : error NU1701: Package 'BenchmarkDotNet 0.5.0' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework '.NETCoreApp,Version=v2.0'. This package may not be fully compatible with your project. [C:\git\StackExchange\StackExchange.Redis\Build.csproj]
    ```
    ...but the approach in this PR is both works and is closer to future plans.
    f798868d
Name
Last commit
Last update
.github Loading commit data...
build Loading commit data...
docs Loading commit data...
src Loading commit data...
tests Loading commit data...
toys Loading commit data...
.editorconfig Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
Build.csproj Loading commit data...
Directory.Build.props Loading commit data...
Directory.Build.targets Loading commit data...
LICENSE Loading commit data...
NuGet.Config Loading commit data...
README.md Loading commit data...
Shared.ruleset Loading commit data...
StackExchange.Redis.sln Loading commit data...
StackExchange.Redis.sln.DotSettings Loading commit data...
StackExchange.Redis.snk Loading commit data...
appveyor.yml Loading commit data...
build.cmd Loading commit data...
build.ps1 Loading commit data...
global.json Loading commit data...
version.json Loading commit data...