From 1c11308e52f154b08fc294b00056edf61e0e251a Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 23 Aug 2019 10:38:29 -0400 Subject: [PATCH] Add DOTNET_ROOT (#12) * Add DOTNET_ROOT * Correct path * DOTNET_ROOT should point at root, not versioned folder --- lib/installer.js | 2 ++ src/installer.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib/installer.js b/lib/installer.js index 5cf9a83..73bded0 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -72,6 +72,8 @@ class DotnetCoreInstaller { else { console.log('Using cached tool'); } + // Need to set this so that .NET Core global tools find the right locations. + core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..')); // Prepend the tools path. instructs the agent to prepend for future tasks core.addPath(toolPath); }); diff --git a/src/installer.ts b/src/installer.ts index 7016be9..4e620e1 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -58,6 +58,9 @@ export class DotnetCoreInstaller { console.log('Using cached tool'); } + // Need to set this so that .NET Core global tools find the right locations. + core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..')); + // Prepend the tools path. instructs the agent to prepend for future tasks core.addPath(toolPath); } @@ -171,6 +174,7 @@ export class DotnetCoreInstaller { this.version, this.arch ); + console.log('Successfully installed', this.version); return cachedDir; }