[mono] Track .dotnet runtime version (#33180)
authorEgor Bogatov <egorbo@gmail.com>
Fri, 13 Mar 2020 16:18:10 +0000 (19:18 +0300)
committerGitHub <noreply@github.com>
Fri, 13 Mar 2020 16:18:10 +0000 (19:18 +0300)
* Track .dotnet runtime version correctly

* Use BundledNETCoreAppPackageVersion

* Rollback to an error

* Update src/mono/mono.proj

Co-Authored-By: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
src/mono/mono.proj
src/mono/netcore/Makefile

index 04e6b0a..3b187a1 100644 (file)
@@ -1,7 +1,6 @@
 <Project>
   <Import Project="Directory.Build.props" />
   <Import Project="Directory.Build.targets" />
-
   <PropertyGroup>
     <MonoObjDir>$(ArtifactsObjDir)mono/$(PlatformConfigPathPart)/</MonoObjDir>
     <MonoEnableLLVM Condition="'$(MonoEnableLLVM)' == ''">false</MonoEnableLLVM>
   </Target>
 
   <Target Name="ValidateLocalDotnet">
+    <Error Condition="$([System.IO.Directory]::GetDirectories('$(LocalDotnetDir)\shared\Microsoft.NETCore.App').Length) > 1" Text="$(LocalDotnetDir) contains more than one SDK, please delete unused ones." />
+    <Error Condition="$([System.IO.Directory]::GetDirectories('$(LocalMonoDotnetDir)\shared\Microsoft.NETCore.App').Length) > 1" Text="$(LocalMonoDotnetDir) contains more than one SDK, please delete unused ones." />
     <Error Condition="!Exists('$(LocalDotnet)')" Text="'$(LocalDotnet)' doesn't exist." />
   </Target>
 
index 77ec080..eb04765 100644 (file)
@@ -1,3 +1,7 @@
+ifeq ($(wildcard ../../../.dotnet),)
+  $(info Downloading local dotnet...)
+endif
+
 DOTNET := $(shell bash init-tools.sh | tail -1)
 # DOTNET_MONO is a copy of DOTNET (local .dotnet) with Mono Runtime bits (see patch-mono-dotnet rule)
 DOTNET_MONO = ../../../.dotnet-mono/dotnet