Skip to content

Commit bc0dc67

Browse files
ViktorHoferCopilot
andauthored
Fix dependabot global.json scanning and clean-up (dotnet#12898)
Stops PR like dotnet#12888 getting opened Add an empty global.json to eng/dependabot so that it never scans the one in the repo root and then attempts to load and update the msbuild sdks defined there. Also rename Packages.props to Directory.Packages.props and delete the unnecessary dependabot.csproj as dependabot now has native support for D.P.props. Unrelated but in the same files: Also remove `ProjectIsDeprecated` conditions as that property is already dead. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 60df124 commit bc0dc67

8 files changed

Lines changed: 16 additions & 15 deletions

File tree

Directory.Build.props

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ ates https://learn.microsoft.com/en-gb/dotnet/fundamentals/syslib-diagnostics/sy
8484

8585
<DisableImplicitNuGetFallbackFolder>true</DisableImplicitNuGetFallbackFolder>
8686

87-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
88-
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
89-
<DirectoryPackagesPropsPath>$([MSBuild]::NormalizePath('$(MSBuildThisFileDirectory)', 'eng', 'Packages.props'))</DirectoryPackagesPropsPath>
90-
9187
<AccelerateBuildsInVisualStudio>true</AccelerateBuildsInVisualStudio>
9288
</PropertyGroup>
9389

Directory.Build.targets

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@
1818
</ItemGroup>
1919

2020
<!-- Global Analyzer Config -->
21-
<ItemGroup Condition="'$(ProjectIsDeprecated)' != 'true'">
22-
<!-- Include Common.globalconfig for non-deprecated projects-->
21+
<ItemGroup>
2322
<EditorConfigFiles Include="$(MSBuildThisFileDirectory)eng/Common.globalconfig" />
2423
</ItemGroup>
2524

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<Project>
2+
23
<!-- Import references updated by Dependabot.
34
This file is for package references updated manually or by Darc/Maestro. -->
4-
<Import Project="dependabot\Packages.props" />
5+
<Import Project="$(RepositoryEngineeringDir)dependabot\Directory.Packages.props" />
6+
7+
<PropertyGroup>
8+
<ManagePackageVersionsCentrally Condition="'$(ManagePackageVersionsCentrally)' == ''">true</ManagePackageVersionsCentrally>
9+
<CentralPackageTransitivePinningEnabled Condition="'$(CentralPackageTransitivePinningEnabled)' == ''">true</CentralPackageTransitivePinningEnabled>
10+
</PropertyGroup>
511

612
<!--
713
Make sure to update the binding redirects (in src\MSBuild\app.config and src\MSBuild\app.amd64.config) for any changes to
@@ -43,6 +49,7 @@
4349
<PackageVersion Include="Microsoft.VisualStudio.OpenTelemetry.Collector" Version="$(MicrosoftVisualStudioOpenTelemetryVersion)" />
4450
<PackageVersion Include="Microsoft.VisualStudio.OpenTelemetry.ClientExtensions" Version="$(MicrosoftVisualStudioOpenTelemetryVersion)" />
4551

46-
<!-- Microsoft.VisualStudio.SolutionPersistence is maintained in eng/dependabot/Packages.props -->
52+
<!-- Microsoft.VisualStudio.SolutionPersistence is maintained in eng/dependabot/Directory.Packages.props -->
4753
</ItemGroup>
54+
4855
</Project>

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060

6161
<PropertyGroup>
6262
<MicrosoftVisualStudioOpenTelemetryVersion>0.2.104-beta</MicrosoftVisualStudioOpenTelemetryVersion>
63-
<!-- Microsoft.VisualStudio.SolutionPersistence is maintained in eng/dependabot/Packages.props -->
63+
<!-- Microsoft.VisualStudio.SolutionPersistence is maintained in eng/dependabot/Directory.Packages.props -->
6464
</PropertyGroup>
6565

6666
<!-- Toolset Dependencies -->
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,9 @@
4949

5050
<PackageVersion Include="Verify.Xunit" Version="19.14.1" />
5151
<PackageVersion Update="Verify.XUnit" Condition="'$(VerifyXUnitVersion)' != ''" Version="$(VerifyXUnitVersion)" />
52-
5352
</ItemGroup>
5453

55-
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true' AND $(ProjectIsDeprecated) != 'true'">
54+
<ItemGroup Condition="'$(DotNetBuildSourceOnly)' != 'true'">
5655
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.4" />
5756
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" PrivateAssets="all"/>
5857
<GlobalPackageReference Include="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.36" PrivateAssets="All" Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'" />

eng/dependabot/dependabot.csproj

Lines changed: 0 additions & 4 deletions
This file was deleted.

eng/dependabot/global.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<!-- Empty file to stop tests from using Directory.Packages.props at repo root -->
3+
</Project>

0 commit comments

Comments
 (0)