Skip to content
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

FAKE still installs DotNet SDK #1818

Closed
matthid opened this issue Mar 14, 2018 · 4 comments
Closed

FAKE still installs DotNet SDK #1818

matthid opened this issue Mar 14, 2018 · 4 comments

Comments

@matthid
Copy link
Member

matthid commented Mar 14, 2018

Description

In the following build dotnet sdk was installed in the correct version and DotNet.Cli still installs the same version again

https://travis-ci.org/fsprojects/Mechanic/builds/353499062?utm_source=github_status&utm_medium=notification

#1813

/cc @severisv any idea what's going on? I think we need to extend "Install" to not call the script if we found the correct version already. I think this is even more problematic. Now we potentially install the correct version and don't even use it :/

@severisv
Copy link
Contributor

From what I can see the installer doesn't check if dotnet is already installed, it just goes ahead and installs when told?

#1813 doesn't change this - it just finds the dotnet already installed from path for the other dotnet commands.

Looking at the Mechanic project I can't see that it specifies an SDK-version to use, so if there are multiple versions installed dotnet will selected the newest, even if the script just installed 2.1.4.

I would advocate that it should be up to the consumer to specify what SDK to use - an implicit connection between DotNet.Install and subsequent DotNet.-calls doesn't seem healthy to me.

I agree it would make sense for DotNet.Install to see if the CLI is already installed before trying, but it is important to note that it is version specific. If it is to use the path variable we have to make sure there is a way to check if a specific version is installed - currently it just accepts any version (but fails if there is no SDK that corresponds with the version in global.json).

So; making DotNet.Install check if dotnet is already installed should be a good idea. It should be easy to check in the default install catalog, but if we can also check for a specific version using the PATH variable that would be great.

@aggieben
Copy link

I removed this target from my build script because of this issue.

@matthid matthid mentioned this issue Mar 24, 2018
@matthid
Copy link
Member Author

matthid commented Mar 24, 2018

I changed the recommendation on how to use the API: https://fake.build/dotnet-cli.html
If you follow the recommendation this issue is fixed and the information from DotNet.Install will flow into the other helpers.

@aggieben
Copy link

Cool, thanks @matthid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants