@@ -29,15 +29,17 @@ the default error message.
29
29
30
30
There is currently a disconnect between the ways the .NET SDK is deployed in
31
31
practice and what the host resolver can discover when searching for compatible
32
- SDKs. By default the host resolver is only going to search for SDKs in machine
33
- wide locations: ` C:\Program Files\dotnet ` , ` %PATH% ` , etc ... The .NET SDK
32
+ SDKs. By default the host resolver is only going to search for SDKs next to
33
+ the running ` dotnet ` . This often means machine-wide locations, since users
34
+ and tools typically rely on ` dotnet ` already being on the user's path when
35
+ launching, instead of specifying a full path to the executable. The .NET SDK
34
36
though is commonly deployed to local locations: ` %LocalAppData%\Microsoft\dotnet ` ,
35
37
` $HOME/.dotnet ` . Many repos embrace this and restore the correct .NET for their
36
38
builds into a local ` .dotnet ` directory.
37
39
38
40
The behavior of the host resolver is incompatible with local based deployments.
39
41
It will not find these deployments without additional environment variable
40
- configuration and instead search in machine wide locations . That means tools
42
+ configuration and only search next to the running ` dotnet ` . That means tools
41
43
like Visual Studio and VS Code simply do not work with local deployment by
42
44
default. Developers must take additional steps like manipulating ` %PATH% ` before
43
45
launching these editors. That reduces the usefulness of items like the quick
@@ -137,8 +139,8 @@ hence discovery stops there.
137
139
This design requires us to only change the host resolver. That means other
138
140
tooling like Visual Studio, VS Code, MSBuild, etc ... would transparently
139
141
benefit from this change. Repositories could update global.json to have
140
- ` additionalPaths ` support ` .dotnet ` and Visual Studio would automatically find
141
- it without any design changes.
142
+ ` paths ` support ` .dotnet ` and Visual Studio would automatically find it without
143
+ any design changes.
142
144
143
145
## Considerations
144
146
@@ -175,8 +177,8 @@ all location and choosing the best match.
175
177
176
178
Best match is a valid approach though. Can certainly see the argument for some
177
179
customers wanting that. Feel like it cuts against the proposal a bit because it
178
- devalues ` additionalPaths ` a bit. If the resolver is switched to best match then
179
- feel like the need for ` additionalPathsOnly ` is much stronger. There would
180
+ devalues ` paths ` a bit. If the resolver is switched to best match then, the need
181
+ for configuration around best versus first match is much stronger. There would
180
182
certainly be a customer segment that wanted to isolate from machine state in
181
183
that case.
182
184
0 commit comments