Fix illink invocation inside VS (#42678)
authorViktor Hofer <viktor.hofer@microsoft.com>
Thu, 24 Sep 2020 22:21:13 +0000 (00:21 +0200)
committerGitHub <noreply@github.com>
Thu, 24 Sep 2020 22:21:13 +0000 (00:21 +0200)
* Fix illink invocation inside VS

Fixes https://github.com/dotnet/runtime/issues/42676

* Update illink-sharedframework.targets

eng/illink.targets
src/libraries/illink-sharedframework.targets

index 9449f1b..e4cb401 100644 (file)
     <!-- When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
          In this case, explicitly specify the path to the dotnet host. -->
     <PropertyGroup Condition=" '$(DOTNET_HOST_PATH)' == '' ">
-      <_DotNetHostDirectory>$(DotNetRoot)</_DotNetHostDirectory>
+      <!-- This is defined when building in Visual Studio. -->
+      <_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
       <_DotNetHostFileName>$([System.IO.Path]::GetFileName('$(DotNetTool)'))</_DotNetHostFileName>
     </PropertyGroup>
 
index c0f6313..e67b180 100644 (file)
@@ -73,7 +73,8 @@
     <!-- When running from Desktop MSBuild, DOTNET_HOST_PATH is not set.
       In this case, explicitly specify the path to the dotnet host. -->
     <PropertyGroup Condition=" '$(DOTNET_HOST_PATH)' == '' ">
-      <_DotNetHostDirectory>$(DotNetRoot)</_DotNetHostDirectory>
+      <!-- This is defined when building in Visual Studio. -->
+      <_DotNetHostDirectory>$(NetCoreRoot)</_DotNetHostDirectory>
       <_DotNetHostFileName>$([System.IO.Path]::GetFileName('$(DotNetTool)'))</_DotNetHostFileName>
     </PropertyGroup>