From a5e0485ebc05979f4d1375815b80c9dd8e8ddd9a Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 2 Jun 2021 12:46:35 -0400 Subject: [PATCH 1/3] [prepare] Restore with dotnet instead of nuget We've been seeing a NuGet restore issue when running prepare on a macOS system with .NET 6 Preview 4 (or greater) installed: Restoring packages for /Users/peter/source/java.interop/tools/logcat-parse/logcat-parse.csproj... NU1202: Package Mono.CSharp 4.0.0.143 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Mono.CSharp 4.0.0.143 supports: net45 (.NETFramework,Version=v4.5) ... Errors in /Users/peter/source/java.interop/tools/logcat-parse/logcat-parse.csproj NU1202: Package Mono.CSharp 4.0.0.143 is not compatible with net6.0 (.NETCoreApp,Version=v6.0). Package Mono.CSharp 4.0.0.143 supports: net45 (.NETFramework,Version=v4.5) This error does not manifest when restoring or building with .NET 6 previews. Avoid it by using the .NET 6 installation in path to restore Java.Interop.sln. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f44a1658f..79b5158c3 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ bin/Build$(CONFIGURATION)/Java.Interop.BootstrapTasks.dll: build-tools/Java.Inte prepare-external $(PREPARE_EXTERNAL_FILES): git submodule update --init --recursive (cd external/xamarin-android-tools && $(MAKE) prepare) - nuget restore + dotnet restore /v:n prepare-core: bin/Build$(CONFIGURATION)/MonoInfo.props src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config From a9afeacf4e92353673457421a84ef5f459ea8559 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 9 Jun 2021 10:47:21 -0700 Subject: [PATCH 2/3] Bump to msbuild 16.10 --- build-tools/automation/azure-pipelines.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index c163b2203..6888adaf8 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -109,7 +109,7 @@ jobs: - script: > dotnet tool install --global boots && - boots --preview Mono + boots https://download.mono-project.com/archive/6.12.0/macos-10-universal/MonoFramework-MDK-6.12.0.145.macos10.xamarin.universal.pkg displayName: Install Mono - script: make prepare CONFIGURATION=$(Build.Configuration) JI_MAX_JDK=$(MaxJdkVersion) From a8a474de388e9a118a2a5c26fef1913a72c8e308 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Wed, 9 Jun 2021 11:07:37 -0700 Subject: [PATCH 3/3] Revert dotnet restore change, use new msbuild instead --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 79b5158c3..f44a1658f 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ bin/Build$(CONFIGURATION)/Java.Interop.BootstrapTasks.dll: build-tools/Java.Inte prepare-external $(PREPARE_EXTERNAL_FILES): git submodule update --init --recursive (cd external/xamarin-android-tools && $(MAKE) prepare) - dotnet restore /v:n + nuget restore prepare-core: bin/Build$(CONFIGURATION)/MonoInfo.props src/Java.Runtime.Environment/Java.Runtime.Environment.dll.config