-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DotNet.install version not being used if dotnet
is already on path
#2215
Comments
You need to "connect" |
This works, thanks! Just wondering though, why is it necessary to connect them when Also, what is the
|
As far as i know, |
You either connect them or manage PATH by hand. Not sure what else we can do there? |
Could it be an option that |
What if "C:\program files\dotnet" is the preferred location in PATH and fake cannot write there? |
I didn't think about that. I guess it's impossible for Fake to install a new SDK into the same folder that What if the algorithm for selecting the default dotnet location took SDK version into account (when I'd be happy to give it a shot if you think it's a reasonable idea :) |
@severisv I don't think |
Description
I have a few versions of dotnet SDK already installed in
C:\Program Files\dotnet
(which the Windows installer picks by default).I have a project with a
global.json
that targets an SDK I have not installed.Doing
DotNet.install DotNet.Versions.FromGlobalJson
correctly identifies that it needs to install a new version and installs it toC:\Users\sever\AppData\Local\Microsoft\dotnet
.Subsequent calls to the
DotNet
module don't find the recently installed version and fail.Workarounds
Remove
dotnet
from path:The script now runs all the way through. This is obviously not a workable solution though.
Specify the location when installing the SDK. Not great because different build servers and different developers will have different preferences.
Specify
DotNetCliPath
. This works, but is kind of annoying as I haven't specified the location in the first place. Would be great ifDotNet
would just pick it up the same way it decided where to install it in the first place.Am I missing something, or is something not working quite as expected?
It would be great if
DotNet.install
could add the freshly intalled version to path by itself, so that once the script was run the SDK would be available for development purposes. I triedbut I couldn't get it to work.
Soo, bottom line, I'm not quite sure if I'm asking for help or reporting a problem. Either way, thanks!
The text was updated successfully, but these errors were encountered: