Skip to content

Commit

Permalink
Onboard to NuGet central package management (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkl committed Mar 10, 2023
1 parent b214683 commit b7d8c0d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
3 changes: 0 additions & 3 deletions Directory.Build.targets

This file was deleted.

24 changes: 12 additions & 12 deletions Packages.props → Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
<MicrosoftBuildPackageVersion>17.4.0</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion Condition="'$(TargetFramework)' == 'net6.0'">17.3.2</MicrosoftBuildPackageVersion>
<MicrosoftBuildPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">16.9.0</MicrosoftBuildPackageVersion>
<NuGetPackageVersion>6.5.0</NuGetPackageVersion>
<NuGetPackageVersion Condition="'$(TargetFramework)' == 'netcoreapp3.1'">5.7.1</NuGetPackageVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Build" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.4.2244" />
<PackageReference Update="NuGet.Frameworks" Version="$(NuGetPackageVersion)" />
<PackageReference Update="Shouldly" Version="4.1.0" />
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
<PackageReference Update="xunit" Version="2.4.2" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.4.5" />
<PackageVersion Include="Microsoft.Build" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildPackageVersion)" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageVersion Include="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.4.2244" />
<PackageVersion Include="NuGet.Frameworks" Version="$(NuGetPackageVersion)" />
<PackageVersion Include="Shouldly" Version="4.1.0" />
<PackageVersion Include="System.IO.Compression" Version="4.3.0" />
<PackageVersion Include="xunit" Version="2.4.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.5" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="4.2.0" />
<GlobalPackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435" />
Expand Down
3 changes: 1 addition & 2 deletions MSBuildProjectCreator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{8339FD67
CONTRIBUTING.md = CONTRIBUTING.md
Directory.Build.props = Directory.Build.props
Directory.Build.rsp = Directory.Build.rsp
Directory.Build.targets = Directory.Build.targets
Directory.Packages.props = Directory.Packages.props
global.json = global.json
key.snk = key.snk
LICENSE = LICENSE
NuGet.config = NuGet.config
Packages.props = Packages.props
README.md = README.md
version.json = version.json
xunit.runner.json = xunit.runner.json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public void CanBuildLotsOfProjects()
"Exec",
parameters: new Dictionary<string, string>
{
["Command"] = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "ping 127.0.0.1 -n 2 >NUL" : "sleep 2s",
["Command"] = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "ping 127.0.0.1 -n 2 >NUL" : "sleep 2",
})
.Save());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public ProjectCreator TryRestore(out bool result)
/// <returns>The current <see cref="ProjectCreator" />.</returns>
public ProjectCreator TryRestore(IDictionary<string, string>? globalProperties, out bool result)
{
return TryRestore(globalProperties, out result, out BuildOutput _, out IDictionary<string, TargetResult> _);
return TryRestore(globalProperties, out result, out BuildOutput _, out IDictionary<string, TargetResult>? _);
}

/// <summary>
Expand All @@ -449,7 +449,7 @@ public ProjectCreator TryRestore(out bool result, out BuildOutput buildOutput)
/// <returns>The current <see cref="ProjectCreator" />.</returns>
public ProjectCreator TryRestore(IDictionary<string, string>? globalProperties, out bool result, out BuildOutput buildOutput)
{
return TryRestore(globalProperties, out result, out buildOutput, out IDictionary<string, TargetResult> _);
return TryRestore(globalProperties, out result, out buildOutput, out IDictionary<string, TargetResult>? _);
}

/// <summary>
Expand Down

0 comments on commit b7d8c0d

Please sign in to comment.