Skip to content

Commit 20d9d1c

Browse files
Revert "[build] Enable NuGet's Central Package Management (dotnet#1114)"
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 such as: <!-- 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" /> 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`: <packageSource key="dotnet-public"> <package pattern="*" /> </packageSource> Because 7.0.11 hasn't shipped yet, it is not on NuGet.org or `dotnet-public`. For this to work, we would somehow need this added to the java.interop repo at the time xamarin/xamarin-android gets a newer .NET 8 SDK: <packageSource key="darc-pub-dotnet-runtime-a2ad4f0"> <package pattern="Microsoft.NETCore.App.Ref" /> </packageSource> For now, let's revert 8c9eece. Maybe there is some solution we can come up with to use this in the future.
1 parent 5adb4d4 commit 20d9d1c

6 files changed

Lines changed: 27 additions & 47 deletions

File tree

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
<ProduceReferenceAssemblyInOutDir>true</ProduceReferenceAssemblyInOutDir>
1010
<DotNetTargetFrameworkVersion>7.0</DotNetTargetFrameworkVersion>
1111
<DotNetTargetFramework>net$(DotNetTargetFrameworkVersion)</DotNetTargetFramework>
12-
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
1312
</PropertyGroup>
1413

1514
<Import

Directory.Build.targets

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

44
<!-- Add Roslyn analyzers NuGet to all projects -->
55
<ItemGroup Condition=" '$(DisableRoslynAnalyzers)' != 'True' ">
6-
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers">
6+
<PackageReference Include="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-
<PackageReference Update="NUnit3TestAdapter">
14+
<PackageReference Update="GitInfo" Version="2.1.2" />
15+
<PackageReference Update="HtmlAgilityPack" Version="1.11.30" />
16+
<PackageReference Update="Irony" Version="1.1.0" />
17+
<PackageReference Update="Microsoft.Build.Framework" Version="17.3.2" />
18+
<PackageReference Update="Microsoft.Build.Utilities.Core" Version="17.3.2" />
19+
<PackageReference Update="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" />
20+
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
21+
<PackageReference Update="Microsoft.DotNet.GenAPI" Version="7.0.0-beta.22103.1" />
22+
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
23+
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" />
24+
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="1.1.1" />
25+
<PackageReference Update="Microsoft.Xml.SgmlReader" Version="1.8.16" />
26+
<PackageReference Update="Mono.CSharp" Version="4.0.0.143" />
27+
<PackageReference Update="Mono.Linq.Expressions" Version="2.0.0" />
28+
<PackageReference Update="Mono.Options" Version="6.12.0.148" />
29+
<PackageReference Update="Mono.Terminal" Version="5.4.2" />
30+
<PackageReference Update="nunit" Version="3.13.2" />
31+
<PackageReference Update="NUnit.ConsoleRunner" Version="3.12.0" />
32+
<PackageReference Update="NUnit3TestAdapter" Version="4.0.0">
1533
<PrivateAssets>all</PrivateAssets>
1634
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1735
</PackageReference>
36+
<PackageReference Update="protobuf-net" Version="2.4.4" />
1837
</ItemGroup>
1938

2039
<Import Project="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
<add key="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-
<packageSource key="dotnet-public">
18-
<package pattern="*" />
19-
</packageSource>
20-
<packageSource key="dotnet-eng">
21-
<package pattern="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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<_XamarinAndroidCecilVersion Condition=" '$(_XamarinAndroidCecilVersion)' == '' ">0.11.4</_XamarinAndroidCecilVersion>
5+
</PropertyGroup>
36
<ItemGroup Condition=" '$(_XamarinAndroidCecilPath)' == '' ">
4-
<PackageReference Include="Mono.Cecil" />
7+
<PackageReference Include="Mono.Cecil" Version="$(_XamarinAndroidCecilVersion)" />
58
</ItemGroup>
69
<ItemGroup Condition=" '$(_XamarinAndroidCecilPath)' != '' ">
710
<Reference Include="$(_XamarinAndroidCecilPath)" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<Import Project="..\..\build-tools\scripts\cecil.projitems" />
2525
-->
2626
<ItemGroup>
27-
<PackageReference Include="Mono.Cecil" />
27+
<PackageReference Include="Mono.Cecil" Version="0.11.4" />
2828
<PackageReference Include="Mono.Linq.Expressions" />
2929
</ItemGroup>
3030

0 commit comments

Comments
 (0)