Skip to content

Commit 1c11308

Browse files
author
Danny McCormick
authored
Add DOTNET_ROOT (#12)
* Add DOTNET_ROOT * Correct path * DOTNET_ROOT should point at root, not versioned folder
1 parent 56ad7c6 commit 1c11308

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/installer.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ class DotnetCoreInstaller {
7272
else {
7373
console.log('Using cached tool');
7474
}
75+
// Need to set this so that .NET Core global tools find the right locations.
76+
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));
7577
// Prepend the tools path. instructs the agent to prepend for future tasks
7678
core.addPath(toolPath);
7779
});

src/installer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ export class DotnetCoreInstaller {
5858
console.log('Using cached tool');
5959
}
6060

61+
// Need to set this so that .NET Core global tools find the right locations.
62+
core.exportVariable('DOTNET_ROOT', path.join(toolPath, '../..'));
63+
6164
// Prepend the tools path. instructs the agent to prepend for future tasks
6265
core.addPath(toolPath);
6366
}
@@ -171,6 +174,7 @@ export class DotnetCoreInstaller {
171174
this.version,
172175
this.arch
173176
);
177+
174178
console.log('Successfully installed', this.version);
175179
return cachedDir;
176180
}

0 commit comments

Comments
 (0)