Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

Commit 7e3bd2f

Browse files
Revert "[build] Enable NuGet's Central Package Management (#1114)" (#1138)
Context: dotnet/android#8279 This reverts commit 8c9eece. Near the end of .NET 8 RC 1, the .NET 8 SDK depends on nightly packages for .NET 6 and .NET 7: * dotnet/runtime 7.0.11 * dotnet/runtime 6.0.22 These come from feeds within `NuGet.config` such as: <packageSources> <clear/> <!-- Added manually for dotnet/runtime 7.0.11 --> <add key="darc-pub-dotnet-runtime-a2ad4f0" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-a2ad4f03/nuget/v3/index.json" /> <!-- Added manually for dotnet/runtime 6.0.22 --> <add key="darc-pub-dotnet-runtime-762f437" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-762f4379/nuget/v3/index.json" /> </packageSources> The version number is stable, so the .NET releng team has infrastructure to create a new feed per git commit. Unfortunately, this makes NuGet central package management unusable for us. 😢 As seen in dotnet/android#8279, we get errors like: Package source mapping matches found for package ID 'Microsoft.NETCore.App.Ref' are: 'dotnet-public'. … external\Java.Interop\src\Java.Interop.Tools.Expressions\Java.Interop.Tools.Expressions.csproj error NU1102: Unable to find package Microsoft.NETCore.App.Ref with version (= 7.0.11) - Found 83 version(s) in dotnet-public [ Nearest version: 8.0.0-preview.1.23110.8 ] - Versions from dotnet-eng were not considered [Xamarin.Android.sln] This is because it can only possibly resolve this package from `dotnet-public`: <packageSourceMapping> <packageSource key="dotnet-public"> <package pattern="*" /> </packageSource> </packageSourceMapping> Because 7.0.11 hasn't shipped yet, it is on neither NuGet.org nor `dotnet-public`. For this to work, we would somehow need this `NuGet.config` fragment to be added to the xamarin/java.interop repo whenever xamarin/xamarin-android gets a newer .NET 8 SDK: <packageSourceMapping> <packageSource key="darc-pub-dotnet-runtime-[HASH]"> <package pattern="Microsoft.NETCore.App.Ref" /> </packageSource> </packageSourceMapping> For now, let's revert 8c9eece. Maybe there is some solution we can come up with to use this in the future.
1 parent 7961b36 commit 7e3bd2f

6 files changed

Lines changed: 26 additions & 49 deletions

File tree

‎Directory.Build.props‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
<DisableTransitiveFrameworkReferenceDownloads>true</DisableTransitiveFrameworkReferenceDownloads>
1212
<DotNetTargetFrameworkVersion>7.0</DotNetTargetFrameworkVersion>
1313
<DotNetTargetFramework>net$(DotNetTargetFrameworkVersion)</DotNetTargetFramework>
14-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
1514
</PropertyGroup>
1615

1716
<Import

‎Directory.Build.targets‎

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,36 @@
33

44
<!-- Add Roslyn analyzers NuGet to all projects -->
55
<ItemGroupCondition=" '$(DisableRoslynAnalyzers)' != 'True' ">
6-
<PackageReferenceInclude="Microsoft.CodeAnalysis.FxCopAnalyzers">
6+
<PackageReferenceInclude="Microsoft.CodeAnalysis.FxCopAnalyzers"Version="3.3.0">
77
<PrivateAssets>all</PrivateAssets>
88
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
99
</PackageReference>
1010
</ItemGroup>
1111

12-
<!--Set Assets for NUnit3TestAdapter-->
12+
<!--NuGet Dependencies-->
1313
<ItemGroup>
14-
<PackageReferenceUpdate="NUnit3TestAdapter">
14+
<PackageReferenceUpdate="GitInfo"Version="2.1.2" />
15+
<PackageReferenceUpdate="HtmlAgilityPack"Version="1.11.30" />
16+
<PackageReferenceUpdate="Irony"Version="1.1.0" />
17+
<PackageReferenceUpdate="Microsoft.Build.Framework"Version="17.3.2" />
18+
<PackageReferenceUpdate="Microsoft.Build.Utilities.Core"Version="17.3.2" />
19+
<PackageReferenceUpdate="Microsoft.CodeAnalysis.CSharp"Version="4.3.1" />
20+
<PackageReferenceUpdate="Microsoft.CSharp"Version="4.7.0" />
21+
<PackageReferenceUpdate="Microsoft.DotNet.GenAPI"Version="7.0.0-beta.22103.1" />
22+
<PackageReferenceUpdate="Microsoft.NET.Test.Sdk"Version="17.5.0-preview-20221003-04" />
23+
<PackageReferenceUpdate="Microsoft.SourceLink.GitHub"Version="1.1.1" />
24+
<PackageReferenceUpdate="Microsoft.Xml.SgmlReader"Version="1.8.16" />
25+
<PackageReferenceUpdate="Mono.CSharp"Version="4.0.0.143" />
26+
<PackageReferenceUpdate="Mono.Linq.Expressions"Version="2.0.0" />
27+
<PackageReferenceUpdate="Mono.Options"Version="6.12.0.148" />
28+
<PackageReferenceUpdate="Mono.Terminal"Version="5.4.2" />
29+
<PackageReferenceUpdate="nunit"Version="3.13.2" />
30+
<PackageReferenceUpdate="NUnit.ConsoleRunner"Version="3.12.0" />
31+
<PackageReferenceUpdate="NUnit3TestAdapter"Version="4.0.0">
1532
<PrivateAssets>all</PrivateAssets>
1633
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1734
</PackageReference>
35+
<PackageReferenceUpdate="protobuf-net"Version="2.4.4" />
1836
</ItemGroup>
1937

2038
<ImportProject="build-tools\scripts\VersionInfo.targets" />

‎Directory.Packages.props‎

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

‎NuGet.Config‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,4 @@
1111
<!-- For Microsoft.DotNet.GenAPI -->
1212
<addkey="dotnet-eng"value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json"protocolVersion="3" />
1313
</packageSources>
14-
15-
<packageSourceMapping>
16-
<!-- key value for <packageSource> should match key values from <packageSources> element -->
17-
<packageSourcekey="dotnet-public">
18-
<packagepattern="*" />
19-
</packageSource>
20-
<packageSourcekey="dotnet-eng">
21-
<packagepattern="Microsoft.DotNet.GenAPI" />
22-
</packageSource>
23-
</packageSourceMapping>
2414
</configuration>

‎build-tools/scripts/cecil.projitems‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Projectxmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<_XamarinAndroidCecilVersionCondition=" '$(_XamarinAndroidCecilVersion)' == '' ">0.11.4</_XamarinAndroidCecilVersion>
5+
</PropertyGroup>
36
<ItemGroupCondition=" '$(_XamarinAndroidCecilPath)' == '' ">
4-
<PackageReferenceInclude="Mono.Cecil" />
7+
<PackageReferenceInclude="Mono.Cecil"Version="$(_XamarinAndroidCecilVersion)"/>
58
</ItemGroup>
69
<ItemGroupCondition=" '$(_XamarinAndroidCecilPath)' != '' ">
710
<ReferenceInclude="$(_XamarinAndroidCecilPath)" />

‎tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
<PackageReferenceInclude="NUnit3TestAdapter" />
2121
</ItemGroup>
2222

23-
<!--
2423
<ImportProject="..\..\build-tools\scripts\cecil.projitems" />
25-
-->
24+
2625
<ItemGroup>
27-
<PackageReferenceInclude="Mono.Cecil" />
2826
<PackageReferenceInclude="Mono.Linq.Expressions" />
2927
</ItemGroup>
3028

0 commit comments

Comments
 (0)