dotnet tool list -g failed when run multiple times simultaneously
See original GitHub issuePrerequisites
- net50 sdk and runtime are installed. May be another core sdks affect. Sorry, I don’t have a clear computer to make pure experiment.
- Any dotnet tool is installed. I have an installed fluentmigrator. I installed it by next command:
dotnet tool install -g FluentMigrator.DotNet.Cli
Seems it doesn’t matter what dotnet tool is installed
What to do
Run multiple commands
dotnet tool list -g
It matters to do it simultaneously I wrote a small c# console, see attached zip file (described in Reproduction section below)
Expectation
No errors, just a table with installed tools in the output of each run command.
Reality
Some of run commands failed with invalid output like this:
Package Id Version Commands Warning: tool package 'fluentmigrator.dotnet.cli' is invalid, contact tool author:
Failed to retrieve tool configuration: The process cannot access the file 'C:\Users\username\.dotnet\tools\.store\fluentmigrator.dotnet.cli\3.2.11\fl
uentmigrator.dotnet.cli\3.2.11\tools\netcoreapp2.1\any\DotnetToolSettings.xml' because it is being used by another process.
Reproduction
See attached zip file with c# console solution. DotnetToolListIssue.zip It runs 10 commands. At least 2 of them fail run by run stably On my computer an output of console looks like this:
Package Id Version Commands Package Id Version Commands
Warning: tool package 'fluentmigrator.dotnet.cli' is invalid, contact tool author:
Failed to retrieve tool configuration: The process cannot access the file 'C:\Users\alexn\.dotnet\tools\.store\fluentmigrator.dotnet.cli\3.2.11\fl
uentmigrator.dotnet.cli\3.2.11\tools\netcoreapp2.1\any\DotnetToolSettings.xml' because it is being used by another process.
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands
-------------------------------------
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands
-----------------------------------------------------
Package Id Version Commands
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fmfluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands Warning: tool package 'fluentmigrator.dotnet.cli' is invalid, contact tool author:
Failed to retrieve tool configuration: The process cannot access the file 'C:\Users\alexn\.dotnet\tools\.store\fluentmigrator.dotnet.cli\3.2.11\fl
uentmigrator.dotnet.cli\3.2.11\tools\netcoreapp2.1\any\DotnetToolSettings.xml' because it is being used by another process.
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands
-------------------------------------
Package Id Version Commands
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Package Id Version Commands
-----------------------------------------------------
fluentmigrator.dotnet.cli 3.2.11 dotnet-fm
Extra information about my machine:
dotnet --list-sdks
> dotnet --list-sdks
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.102 [C:\Program Files\dotnet\sdk]
dotnet --list-runtimes
> dotnet --list-runtimes
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.24 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.11 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
systeminfo
> systeminfo
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19042 N/A Build 19042
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: AMD64 Family 23 Model 113 Stepping 0 AuthenticAMD ~3593 Mhz
BIOS Version: American Megatrends Inc. 2008, 06.12.2019
Total Physical Memory: 65 471 MB
Hotfix(s): 9 Hotfix(s) Installed.
[01]: KB4586876
[02]: KB4562830
[03]: KB4570334
[04]: KB4577266
[05]: KB4580325
[06]: KB4586864
[07]: KB4593175
[08]: KB4598481
[09]: KB4598242
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
c# - Installed Dotnet tools give error "Could not execute ...
c# - Installed Dotnet tools give error "Could not execute because the specified command or file was not found." on Ubuntu WSL2 -...
Read more >Troubleshoot .NET tool usage issues
NET tool fails to run, most likely you ran into one of the following issues: The executable file for the tool wasn't found....
Read more >Upgrade Assistant
The Upgrade assistant automates the transition from an ASP.NET Standard project to an ASP.NET Core project. The tool employs the following steps.
Read more >Dotnet restore vs nuget restore. Share. In my code repo, there
Dotnet restore vs nuget restore. Share. In my code repo, there is nuget. config and PackageReference. The solution we found includes two parts:...
Read more >Dotnet fails to install tools - Microsoft Q&A
I cannot install the AWS Lambda tools in dotnet: $ dotnet tool install -g Amazon.Lambda.Tools error NU1100: Unable to resolve ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I couldn’t figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Thanks for confirming - I agree that it should be fixed.