Skip to content

Commit 0831008

Browse files
Add SDK hint paths
- Add new .NET 10 properties for locating the .NET SDK. - Move from `.dotnetcli` to `.dotnet`.
1 parent d46f2ea commit 0831008

File tree

7 files changed

+11
-9
lines changed

7 files changed

+11
-9
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
"postCreateCommand": "./build.ps1 -SkipTests",
2626
"remoteEnv": {
2727
"DOTNET_ROLL_FORWARD": "Major",
28-
"PATH": "/root/.dotnet/tools:${containerWorkspaceFolder}/.dotnetcli:${containerEnv:PATH}"
28+
"PATH": "/root/.dotnet/tools:${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}"
2929
}
3030
}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.DS_Store
2-
.dotnetcli
2+
.dotnet
33
.idea
44
.metadata
55
.settings

build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ else {
4747

4848
if ($installDotNetSdk -eq $true) {
4949

50-
$env:DOTNET_INSTALL_DIR = Join-Path $PSScriptRoot ".dotnetcli"
50+
$env:DOTNET_INSTALL_DIR = Join-Path $PSScriptRoot ".dotnet"
5151
$sdkPath = Join-Path $env:DOTNET_INSTALL_DIR "sdk" "$dotnetVersion"
5252

5353
if (!(Test-Path $sdkPath)) {

global.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"sdk": {
33
"version": "9.0.202",
44
"allowPrerelease": false,
5-
"rollForward": "latestMajor"
5+
"rollForward": "latestMajor",
6+
"paths": [ ".dotnet", "$host$" ],
7+
"errorMessage": "The required version of the .NET SDK could not be found. Please run ./build.ps1 to bootstrap the .NET SDK."
68
}
79
}

omnisharp.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"enableEditorConfigSupport": true
1212
},
1313
"msbuild": {
14-
"MSBuildSDKsPath": ".\\.dotnetcli",
14+
"MSBuildSDKsPath": ".\\.dotnet",
1515
"EnablePackageAutoRestore": true,
1616
"loadProjectsOnDemand": true
1717
},

startvs.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SETLOCAL
44
:: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET SDK.
55

66
:: This tells .NET to use the same dotnet.exe that the build script uses.
7-
SET DOTNET_ROOT=%~dp0.dotnetcli
8-
SET DOTNET_ROOT(x86)=%~dp0.dotnetcli\x86
7+
SET DOTNET_ROOT=%~dp0.dotnet
8+
SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
99

1010
:: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use.
1111
SET PATH=%DOTNET_ROOT%;%PATH%

startvscode.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ SETLOCAL
44
:: This command launches Visual Studio Code with environment variables required to use a local version of the .NET SDK.
55

66
:: This tells .NET to use the same dotnet.exe that the build script uses.
7-
SET DOTNET_ROOT=%~dp0.dotnetcli
8-
SET DOTNET_ROOT(x86)=%~dp0.dotnetcli\x86
7+
SET DOTNET_ROOT=%~dp0.dotnet
8+
SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
99

1010
:: Put our local dotnet.exe on PATH first so Visual Studio Code knows which one to use.
1111
SET PATH=%DOTNET_ROOT%;%PATH%

0 commit comments

Comments
 (0)