Skip to content

Commit bb36ed7

Browse files
Copilotbrianrob
andauthored
Implement NuGet Central Package Version Management (#2262)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: brianrob <6210322+brianrob@users.noreply.github.com> Co-authored-by: Brian Robbins <brianrob@microsoft.com>
1 parent e9a2b7e commit bb36ed7

25 files changed

Lines changed: 191 additions & 143 deletions

File tree

Nuget.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
99
<add key="perfview-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/perfview-build/nuget/v3/index.json" />
1010
</packageSources>
11+
<packageSourceMapping>
12+
<packageSource key="dotnet-public">
13+
<package pattern="*" />
14+
</packageSource>
15+
<packageSource key="perfview-build">
16+
<package pattern="Microsoft.Diagnostics.Tracing*" />
17+
<package pattern="PerfView.*" />
18+
</packageSource>
19+
</packageSourceMapping>
1120
<disabledPackageSources>
1221
<clear />
1322
</disabledPackageSources>

src/CSVReader/CSVReader.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<Authenticode>Microsoft400</Authenticode>
2424
<StrongName>StrongName</StrongName>
2525
</FilesToSign>
26-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
26+
<PackageReference Include="MicroBuild.Core" />
2727
</ItemGroup>
2828

2929
<!-- .NET Strong Name Signing -->

src/Directory.Build.props

Lines changed: 2 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -29,64 +29,16 @@
2929
<UtilitiesVersion>$(ReleaseVersion)</UtilitiesVersion>
3030
</PropertyGroup>
3131

32-
<!-- Support files and analyzers -->
32+
<!-- ClrMD version handling -->
3333
<PropertyGroup>
34-
<PerfViewSupportFilesVersion>1.0.8</PerfViewSupportFilesVersion>
35-
<MicrosoftDiagnosticsTracingTraceEventSupportFilesVersion>1.0.30</MicrosoftDiagnosticsTracingTraceEventSupportFilesVersion>
36-
<MicrosoftDiagnosticsTracingTraceEventAutomatedAnalysisAnalyzersVersion>0.1.2</MicrosoftDiagnosticsTracingTraceEventAutomatedAnalysisAnalyzersVersion>
37-
</PropertyGroup>
38-
39-
<!-- External dependencies -->
40-
<PropertyGroup>
41-
<AzureCoreVersion>1.38.0</AzureCoreVersion>
42-
<AzureIdentityVersion>1.11.4</AzureIdentityVersion>
43-
<MicroBuildCoreVersion>0.3.1</MicroBuildCoreVersion>
44-
<MicrosoftDiagnosticsNETCoreClientVersion>0.2.510501</MicrosoftDiagnosticsNETCoreClientVersion>
45-
<MicrosoftIdentityClientVersion>4.61.3</MicrosoftIdentityClientVersion>
46-
<MicrosoftIdentityClientExtensionsMsalVersion>4.61.3</MicrosoftIdentityClientExtensionsMsalVersion>
47-
<MicrosoftIdentityModelAbstractionsVersion>7.1.2</MicrosoftIdentityModelAbstractionsVersion>
48-
<MicrosoftIdentityModelTokensVersion>7.1.2</MicrosoftIdentityModelTokensVersion>
49-
<MicrosoftIdentityModelJsonWebTokensVersion>7.1.2</MicrosoftIdentityModelJsonWebTokensVersion>
50-
<MicrosoftSourceLinkGitHubVersion>8.0.0</MicrosoftSourceLinkGitHubVersion>
51-
<MicrosoftWin32RegistryVersion>5.0.0</MicrosoftWin32RegistryVersion>
52-
<MicrosoftWebWebView2Version>1.0.2792.45</MicrosoftWebWebView2Version>
53-
<SystemBuffersVersion>4.5.1</SystemBuffersVersion>
54-
<SystemCollectionsImmutableVersion>8.0.0</SystemCollectionsImmutableVersion>
55-
<SystemDiagnosticsDiagnosticSourceVersion>8.0.0</SystemDiagnosticsDiagnosticSourceVersion>
56-
<SystemMemoryVersion>4.5.5</SystemMemoryVersion>
57-
<SystemNumericsVectorsVersion>4.5.0</SystemNumericsVectorsVersion>
58-
<SystemReflectionMetadataVersion>8.0.0</SystemReflectionMetadataVersion>
59-
<SystemReflectionTypeExtensionsVersion>4.7.0</SystemReflectionTypeExtensionsVersion>
60-
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
61-
<SystemRuntimeInteropServicesRuntimeInformationVersion></SystemRuntimeInteropServicesRuntimeInformationVersion>
62-
<SystemSecurityCryptographyAlgorithmsVersion>4.3.1</SystemSecurityCryptographyAlgorithmsVersion>
63-
<SystemSecurityCryptographyProtectedDataVersion>4.7.0</SystemSecurityCryptographyProtectedDataVersion>
64-
<SystemTextEncodingsWebVersion>8.0.0</SystemTextEncodingsWebVersion>
65-
<SystemTextJsonVersion>8.0.5</SystemTextJsonVersion>
66-
<SystemThreadingTasksExtensionsVersion>4.5.4</SystemThreadingTasksExtensionsVersion>
67-
</PropertyGroup>
68-
69-
<!-- ClrMD -->
70-
<PropertyGroup>
71-
<MicrosoftDiagnosticsRuntimeVersion>4.0.0-beta.24314.3</MicrosoftDiagnosticsRuntimeVersion>
72-
<!-- If we set MicrosoftDiagnosticsRuntimeVersion to 'local' instead of the version below, it will build PerfView with a locally built ClrMD. -->
34+
<!-- If we set MicrosoftDiagnosticsRuntimeVersion to 'local', it will build PerfView with a locally built ClrMD. -->
7335
<!-- This particular path assume clrmd is cloned side-by-side with PerfView, feel free to change as needed. -->
7436
<!--
7537
<MicrosoftDiagnosticsRuntimeVersion>local</MicrosoftDiagnosticsRuntimeVersion>
7638
<MicrosoftDiagnosticsRuntimePath>$(MSBuildThisFileDirectory)\..\..\clrmd\artifacts\bin\Microsoft.Diagnostics.Runtime\$(Configuration)\netstandard2.0\Microsoft.Diagnostics.Runtime.dll</MicrosoftDiagnosticsRuntimePath>
7739
-->
7840
</PropertyGroup>
7941

80-
<!-- Test dependencies -->
81-
<PropertyGroup>
82-
<MicrosoftVisualStudioThreadingVersion>17.8.14</MicrosoftVisualStudioThreadingVersion>
83-
<XunitVersion>2.6.5</XunitVersion>
84-
<XunitExtensibilityCoreVersion>2.6.5</XunitExtensibilityCoreVersion>
85-
<XunitExtensibilityExecutionVersion>2.6.5</XunitExtensibilityExecutionVersion>
86-
<XunitRunnerVisualstudioVersion>2.5.6</XunitRunnerVisualstudioVersion>
87-
<XunitStaFactVersion>0.3.2</XunitStaFactVersion>
88-
</PropertyGroup>
89-
9042
<PropertyGroup>
9143
<!--
9244
Make sure any documentation comments which are included in code get checked for syntax during the build, but do

src/Directory.Packages.props

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project>
3+
4+
<!-- Enable NuGet Central Package Management -->
5+
<PropertyGroup>
6+
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
7+
</PropertyGroup>
8+
9+
<!-- Support files and analyzers -->
10+
<ItemGroup>
11+
<PackageVersion Include="PerfView.SupportFiles" Version="1.0.8" />
12+
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent.SupportFiles" Version="1.0.30" />
13+
<PackageVersion Include="Microsoft.Diagnostics.Tracing.TraceEvent.AutomatedAnalysis.Analyzers" Version="0.1.2" />
14+
</ItemGroup>
15+
16+
<!-- External dependencies -->
17+
<ItemGroup>
18+
<PackageVersion Include="Azure.Core" Version="1.38.0" />
19+
<PackageVersion Include="Azure.Identity" Version="1.11.4" />
20+
<PackageVersion Include="MicroBuild.Core" Version="0.3.1" />
21+
<PackageVersion Include="Microsoft.Diagnostics.NETCore.Client" Version="0.2.510501" />
22+
<PackageVersion Include="Microsoft.Identity.Client" Version="4.61.3" />
23+
<PackageVersion Include="Microsoft.Identity.Client.Extensions.Msal" Version="4.61.3" />
24+
<PackageVersion Include="Microsoft.IdentityModel.Abstractions" Version="7.1.2" />
25+
<PackageVersion Include="Microsoft.IdentityModel.Tokens" Version="7.1.2" />
26+
<PackageVersion Include="Microsoft.IdentityModel.JsonWebTokens" Version="7.1.2" />
27+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
28+
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
29+
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2792.45" />
30+
<PackageVersion Include="System.Buffers" Version="4.5.1" />
31+
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
32+
<PackageVersion Include="System.Diagnostics.DiagnosticSource" Version="8.0.0" />
33+
<PackageVersion Include="System.Memory" Version="4.5.5" />
34+
<PackageVersion Include="System.Numerics.Vectors" Version="4.5.0" />
35+
<PackageVersion Include="System.Reflection.Metadata" Version="8.0.0" />
36+
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
37+
<PackageVersion Include="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
38+
<PackageVersion Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
39+
<PackageVersion Include="System.Security.Cryptography.ProtectedData" Version="4.7.0" />
40+
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
41+
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
42+
<PackageVersion Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
43+
</ItemGroup>
44+
45+
<!-- ClrMD -->
46+
<ItemGroup>
47+
<PackageVersion Include="Microsoft.Diagnostics.Runtime" Version="4.0.0-beta.24314.3" />
48+
</ItemGroup>
49+
50+
<!-- Test dependencies -->
51+
<ItemGroup>
52+
<PackageVersion Include="Microsoft.VisualStudio.Threading" Version="17.8.14" />
53+
<PackageVersion Include="xunit" Version="2.6.5" />
54+
<PackageVersion Include="xunit.extensibility.core" Version="2.6.5" />
55+
<PackageVersion Include="xunit.extensibility.execution" Version="2.6.5" />
56+
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.6" />
57+
<PackageVersion Include="Xunit.StaFact" Version="0.3.2" />
58+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
59+
</ItemGroup>
60+
61+
<!-- Sample dependencies -->
62+
<ItemGroup>
63+
<PackageVersion Include="System.Reactive.Linq" Version="5.0.0" />
64+
</ItemGroup>
65+
66+
</Project>

src/EtwClrProfilerSigning/EtwClrProfilerSigning.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<FilesToSign Include="$(OutDir)\amd64\EtwClrProfiler.dll">
2929
<Authenticode>Microsoft400</Authenticode>
3030
</FilesToSign>
31-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
31+
<PackageReference Include="MicroBuild.Core" />
3232
</ItemGroup>
3333
<ItemGroup>
3434
<ProjectReference Include="..\EtwClrProfiler\ETWClrProfilerX64.vcxproj" />

src/EtwHeapDump/EtwHeapDump.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
<ItemGroup>
2323
<!-- *** SourceLink Support *** -->
24-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All" />
24+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
2525
</ItemGroup>
2626

2727
<!-- ******************* Signing Support *********************** -->
@@ -31,22 +31,22 @@
3131
<StrongName>StrongName</StrongName>
3232
</FilesToSign>
3333

34-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
34+
<PackageReference Include="MicroBuild.Core" />
3535
</ItemGroup>
3636

3737
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' != 'local'">
38-
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
38+
<PackageReference Include="Microsoft.Diagnostics.Runtime" />
3939
</ItemGroup>
4040
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' == 'local'">
41-
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
41+
<PackageReference Include="System.Collections.Immutable" />
4242
<Reference Include="Microsoft.Diagnostics.Runtime">
4343
<HintPath>$(MicrosoftDiagnosticsRuntimePath)</HintPath>
4444
</Reference>
4545
</ItemGroup>
4646

4747
<!-- Override the version of System.Text.Json that is transitively included to address security issues. -->
4848
<ItemGroup>
49-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
49+
<PackageReference Include="System.Text.Json" />
5050
</ItemGroup>
5151

5252
<ItemGroup>

src/FastSerialization/FastSerialization.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
<ItemGroup>
2828
<!-- *** SourceLink Support *** -->
29-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All" />
29+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
3030
</ItemGroup>
3131

3232
<!-- ******************* Signing Support *********************** -->
@@ -35,7 +35,7 @@
3535
<Authenticode>Microsoft400</Authenticode>
3636
<StrongName>StrongName</StrongName>
3737
</FilesToSign>
38-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
38+
<PackageReference Include="MicroBuild.Core" />
3939
</ItemGroup>
4040

4141
<!-- .NET Strong Name Signing -->

src/HeapDump/HeapDump.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
</PropertyGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="PerfView.SupportFiles" Version="$(PerfViewSupportFilesVersion)" PrivateAssets="all" />
34+
<PackageReference Include="PerfView.SupportFiles" PrivateAssets="all" />
3535
</ItemGroup>
3636

3737
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' != 'local'">
38-
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
38+
<PackageReference Include="Microsoft.Diagnostics.Runtime" />
3939
</ItemGroup>
4040
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' == 'local'">
4141
<Reference Include="Microsoft.Diagnostics.Runtime">
@@ -45,14 +45,14 @@
4545

4646
<!-- Override the version of System.Text.Json that is transitively included to address security issues. -->
4747
<ItemGroup>
48-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
48+
<PackageReference Include="System.Text.Json" />
4949
</ItemGroup>
5050

5151
<ItemGroup>
5252
<ProjectReference Include="..\FastSerialization\FastSerialization.csproj" />
5353
<ProjectReference Include="..\TraceEvent\TraceEvent.csproj" />
5454
<!-- *** SourceLink Support *** -->
55-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All"/>
55+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All"/>
5656
</ItemGroup>
5757

5858
<ItemGroup>
@@ -92,7 +92,7 @@
9292
<FilesToSign Include="$(TargetPath)">
9393
<Authenticode>Microsoft400</Authenticode>
9494
</FilesToSign>
95-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
95+
<PackageReference Include="MicroBuild.Core" />
9696
</ItemGroup>
9797

9898
</Project>

src/HeapDumpDLL/HeapDumpDLL.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,22 @@
2424

2525
<ItemGroup>
2626
<!-- *** SourceLink Support *** -->
27-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(MicrosoftSourceLinkGitHubVersion)" PrivateAssets="All" />
27+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
2828
</ItemGroup>
2929

3030
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' != 'local'">
31-
<PackageReference Include="Microsoft.Diagnostics.Runtime" Version="$(MicrosoftDiagnosticsRuntimeVersion)" />
31+
<PackageReference Include="Microsoft.Diagnostics.Runtime" />
3232
</ItemGroup>
3333
<ItemGroup Condition="'$(MicrosoftDiagnosticsRuntimeVersion)' == 'local'">
34-
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
34+
<PackageReference Include="System.Collections.Immutable" />
3535
<Reference Include="Microsoft.Diagnostics.Runtime">
3636
<HintPath>$(MicrosoftDiagnosticsRuntimePath)</HintPath>
3737
</Reference>
3838
</ItemGroup>
3939

4040
<!-- Override the version of System.Text.Json that is transitively included to address security issues. -->
4141
<ItemGroup>
42-
<PackageReference Include="System.Text.Json" Version="$(SystemTextJsonVersion)" />
42+
<PackageReference Include="System.Text.Json" />
4343
</ItemGroup>
4444

4545
<ItemGroup>
@@ -78,7 +78,7 @@
7878
<Authenticode>Microsoft400</Authenticode>
7979
<StrongName>StrongName</StrongName>
8080
</FilesToSign>
81-
<PackageReference Include="MicroBuild.Core" Version="$(MicroBuildCoreVersion)" />
81+
<PackageReference Include="MicroBuild.Core" />
8282
</ItemGroup>
8383

8484
<!-- .NET Strong Name Signing -->

src/LinuxTracing.Tests/LinuxTracing.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="xunit" Version="$(XunitVersion)" />
18-
<PackageReference Include="xunit.runner.visualstudio" Version="$(XunitRunnerVisualstudioVersion)" PrivateAssets="all" />
17+
<PackageReference Include="xunit" />
18+
<PackageReference Include="xunit.runner.visualstudio" PrivateAssets="all" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

0 commit comments

Comments
 (0)