diff --git a/lib/installer.js b/lib/installer.js index 5cf9a839b..73bded042 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 7016be94c..4e620e18b 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; }