-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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-sdk-8.0.200] dotnet tool install command get access deny message #38354
Comments
Thanks for reporting it |
Hi @Junjun-zhao, may i ask if the |
It comes from public NuGet feed: NuGet Gallery | gti 1.0.0 |
Thank you so much @Junjun-zhao for this issue, I tried reproducing this issue with 8.0.2xx and it shows For tools other than the |
Yes. This is the difference from previous behavior. Before dotnet-sdk-8.0.200, it will check the installation information and shows the message that tool 'gti' is already installed. |
@Junjun-zhao Chet doesn't see this in .net 9 or 8.0.301. Can you confirm it still repros for you in 8.0.300 (8.0.2xx is out of support now) |
@marcpopMSFT Thanks for your quickly response. It is still reproduced with the latest 9.0 P5 build & 8.0.300 build. Verify Scenarios: From the screenshot, it indicates only execute "dotnet tool install –g gti" command twice, it can't repro the issue. Please try with the following steps. Thanks.
|
Update status for .NET 8 release:
|
Thanks for the clarification. If it's the gti install command failing, that's on the tool itself, not on the SDK. It looks like the tool calls the install through us but it's trying to replace itself which is probably why it gets access denied and would need to find some other way to make the install work. I don't know why it worked before but this doesn't seem like a priority. |
@marcpopMSFT I was asked to look at this bug. I agree with your assessment that the error is likely because the tool is trying to update itself (calling dotnet tool install -g on its own id). However, it looks like this is the result of some change in behavior for dotnet tool install where it is reinstalling rather than simply indicating that the tool is already installed. If that behavior is "by design", then that's fine, but it should be taken through the breaking change process. If that behavior is not "by design", then it should be fixed. |
Hmmm, I'll have to think more on this. We made an intentional change in how we install tools but there wasn't an intentional change in behavior around locking the files or not-reinstalling. If we are installing the same version that's already installed, perhaps that's something we could potentially resolve. Beyond that, I don't now how I would phrase this as a breaking change as it's not like there was something we intentionally broke. We don't think the original tool listed in this issue should be doing what it does (updating itself) but we don't have a good alternative. cc @baronfel |
@marcpopMSFT @marklio This should be same as this issue dotnet tool install --global reinstalls even if the same version is already present which has been fixed since .NET 9 Preview 7 via PR Avoid reinstall tool already installed. Could you please have a look and see if the fix can be merged to .NET 8 8.0.30x and 8.0.40x releases? Updated verify scenarios with latest release: |
Ping @marcpopMSFT , could you please take a look at this issue again? This issue has been fixed on .NET 9 release. Could it to be fixed on the .NET 8.0.30x and 8.0.40x releases? Thanks. |
Application Name: globaltools
OS: Windows 10 21H2
CPU: X64
.NET Build Number: dotnet-sdk-8.0.200
Verify Scenarios
Issue Description:
When installing dotnet tools with "gti -c install" command, it get access deny error for gti tool installation.
Repro steps:
The machine only has dotnet-sdk-8.0.200 installed. And environment variable DOTNET_ROLL_FORWARD_ON_NO_CANDIDATE_FX set as 2.
1.Open command prompt window.
2. Execute
"dotnet tool install –g gti"
command.3. Navigate to a local folder with "
cd {localfolderpath}
" command4. Execute "
gti –c save
" command.5. Execute "
gti –c install
" command.Expected Result:
Tools will be installed successfully and "Tool is already installed" message will show if the tools were installed before.
Actual Result:
Get access deny error when installing gti tool which had installed before.
DotNet Info:
Findings:
The permissions for the folder path in error message not changed when running with both dotnet-sdk-8.0.101 and dotnet-sdk-8.0.200.
This issue also repro on .NET 9 Preview1 build #38183 and file this bug to tracking the status for .NET 8.
@dotnet-actwx-bot @dotnet/compat
The text was updated successfully, but these errors were encountered: