From 20d9d1c8b7e7ef9c02135b35b81af1074c7edf30 Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 23 Aug 2023 11:35:49 -0500 Subject: [PATCH 1/2] Revert "[build] Enable NuGet's Central Package Management (#1114)" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Context: https://github.com/xamarin/xamarin-android/pull/8279 This reverts commit 8c9eece2b3692f7d3b12dc0b39b4aa386bc6cc3d. 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: 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 xamarin/xamarin-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`: 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: For now, let's revert 8c9eece2. Maybe there is some solution we can come up with to use this in the future. --- Directory.Build.props | 1 - Directory.Build.targets | 25 +++++++++++++-- Directory.Packages.props | 31 ------------------- NuGet.Config | 10 ------ build-tools/scripts/cecil.projitems | 5 ++- ...ava.Interop.Tools.Expressions-Tests.csproj | 2 +- 6 files changed, 27 insertions(+), 47 deletions(-) delete mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index 314a40f53..b944736ac 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,7 +9,6 @@ true 7.0 net$(DotNetTargetFrameworkVersion) - true - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - + + + + + + + + + + + + + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/Directory.Packages.props b/Directory.Packages.props deleted file mode 100644 index f8867b4d9..000000000 --- a/Directory.Packages.props +++ /dev/null @@ -1,31 +0,0 @@ - - - - <_XamarinAndroidCecilVersion Condition=" '$(_XamarinAndroidCecilVersion)' == '' ">0.11.4 - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/NuGet.Config b/NuGet.Config index 7837b3b3c..7d88f5852 100644 --- a/NuGet.Config +++ b/NuGet.Config @@ -11,14 +11,4 @@ - - - - - - - - - - \ No newline at end of file diff --git a/build-tools/scripts/cecil.projitems b/build-tools/scripts/cecil.projitems index b827ee9ed..400d9ef10 100644 --- a/build-tools/scripts/cecil.projitems +++ b/build-tools/scripts/cecil.projitems @@ -1,7 +1,10 @@ + + <_XamarinAndroidCecilVersion Condition=" '$(_XamarinAndroidCecilVersion)' == '' ">0.11.4 + - + diff --git a/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj b/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj index 7454b751b..f9d5dcfbb 100644 --- a/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj +++ b/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj @@ -24,7 +24,7 @@ --> - + From bea5e66fc33d5976dfb1095a11dc05e58580ef2a Mon Sep 17 00:00:00 2001 From: Jonathan Peppers Date: Wed, 23 Aug 2023 13:32:49 -0500 Subject: [PATCH 2/2] Code review feedback --- Directory.Build.targets | 1 - .../Java.Interop.Tools.Expressions-Tests.csproj | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index ad7026807..2bf1fe066 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -20,7 +20,6 @@ - diff --git a/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj b/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj index f9d5dcfbb..daa5abff4 100644 --- a/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj +++ b/tests/Java.Interop.Tools.Expressions-Tests/Java.Interop.Tools.Expressions-Tests.csproj @@ -20,11 +20,9 @@ - + -