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

dotnet-install.ps1 installs locally even when same version is already installed globally #17

Closed
flcdrg opened this issue Apr 3, 2019 · 9 comments
Labels
bug Something isn't working triaged

Comments

@flcdrg
Copy link

flcdrg commented Apr 3, 2019

Steps to reproduce

  1. On a machine that already has 2.2.101 SDK installed
  2. .\dotnet-install.ps1 -Version 2.2.101

Expected behavior

Do nothing.

Maybe provide a -Force parameter so that only when that is given, do you still install the version

Actual behavior

Version is installed into c:\users\USERNAME\AppData\Local\Microsoft\dotnet, even if it was already installed in C:\Program Files\dotnet\sdk

Environment data

dotnet --info output:

.NET Core SDK (reflecting any global.json):
 Version:   2.2.101
 Commit:    236713b0b7

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.101\

Host (useful for support):
  Version: 2.2.0
  Commit:  1249f08fed

.NET Core SDKs installed:
  1.0.0-preview2-003156 [C:\Program Files\dotnet\sdk]
  2.1.200 [C:\Program Files\dotnet\sdk]
  2.1.201 [C:\Program Files\dotnet\sdk]
  2.1.202 [C:\Program Files\dotnet\sdk]
  2.1.302 [C:\Program Files\dotnet\sdk]
  2.1.401 [C:\Program Files\dotnet\sdk]
  2.1.403 [C:\Program Files\dotnet\sdk]
  2.2.100 [C:\Program Files\dotnet\sdk]
  2.2.101 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 1.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download
@flcdrg flcdrg changed the title dotnet-install.ps1 installs locally even when same version installed globally dotnet-install.ps1 installs locally even when same version is already installed globally Apr 3, 2019
@peterhuene
Copy link

@johnbeisner is this something the install script should implement?

@johnbeisner
Copy link

Initial thoughts:
The two installation points, global and local, aren't completely interchangeable. Although we can essentially merge the two by enabling multi-level lookup, a common scenario is to isolate the local SDKs from the global SDKs by disabling multi-level lookup. In this way, machine state variants can be eliminated from build and/or test functions. Since many organizations depend on the current behavior for their build/test, asking them to change the call to dotnet-install.ps1 seems intractable. The way to implement would be an 'opt-in' flag.

@flcdrg
Copy link
Author

flcdrg commented Apr 4, 2019

An opt-in flag sounds reasonable. Something like -SkipIfInGlobal ?

@johnbeisner johnbeisner self-assigned this Apr 25, 2019
@johnbeisner johnbeisner removed their assignment Dec 23, 2019
@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
@bekir-ozturk bekir-ozturk transferred this issue from dotnet/sdk May 19, 2020
@donJoseLuis donJoseLuis added bug Something isn't working triaged labels May 26, 2020
@donJoseLuis
Copy link
Contributor

The need tracked in this issue should be a requirement in the re-engineering effort. Moving to the re-engineering project.

@bekir-ozturk
Copy link
Contributor

Hi,

The scripts are being put into "maintenance mode". This means that the scripts and their ecosystem (i.e. website and feeds) will continue to be monitored, but no new features will be delivered. We are still committed to maintaining the scripts’ high availability and we will quickly respond to any incidents.

As part of this effort, we are closing the issues that aren't planned to be delivered. Unfortunately, this issue is one of those that didn't make the cut, and therefore will be closed.
If you think this is a must-fix issue before maintenance mode begins, please feel free to comment.

Thanks

@bb010g
Copy link

bb010g commented Jun 3, 2023

@bekir-ozturk Is there a successor to these install scripts that is or will be delivering new features?

@bekir-ozturk
Copy link
Contributor

Hi @bb010g,
I'm no longer with the project. Hopefully, @MichalPavlik and @donJoseLuis can shed some light on the matter 🙂

@YuliiaKovalova
Copy link
Member

HI @bb010g ,

We are still in maintenance mode and do not plan to implement any new features.

@MV10
Copy link

MV10 commented Oct 7, 2023

Seems to me the repo README should note that they're in maintenance mode. People are still requesting new features (and a build script written by someone else just nuked my Program Files SDK installation by running this thing without warning, so that's half my day wasted on cleanup).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triaged
Projects
None yet
Development

No branches or pull requests

8 participants