-
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 tool install fails #11244
Comments
I believe |
Can you be a bit more explicit with your workaround steps. This issue doesn't seem related to long path... It is a possible duplicate of #2599 in that could be failing to find a resource that is a design time built file. UPDATE: but that isn't entirely clear as of yet either. |
Take a look at sample above I removed the tfm fragment from |
Try with this branch(old one without shorter path and shorter package name) coverlet-coverage/coverlet@master...MarcoRossignoli:failtest Run pack
Run
I opened to sdk because I started to get error when we changed the nightly package naming adding |
yeah, I see... was able to replicate this using that branch\commit you provided.. there certainly seems to be an issue here... which, as you indicated, the introduction of the optional suffix in the codebase raised this issue. though still it isn't entirely clear whether the underline issue relates to length of arguments. I can see from this build Job log that you are only failing the debug packing for window testing here, not the release. It didn't seem like the DotnetTool test was being excluded there, am I wrong? Though I thought it may be possible that deterministic behavior based of the semver handling of the suffix as it relates to nuget packaging using the that is, Looking over semver 2.0. this Nerdbank.GitVersioning, produces a nuspec for Another workaround and consideration here, is adding the
Furthermore, It doesn't appear as though but yea, there is something to observe on here. |
Interesting should run also in release, need to check if release build generates different/shorter package name in that case. |
We ran into this as well and the culprit seems to be that the standard global tool installation uses very long paths to store the tools
so should you use a longer package id in your package because the package ID is stored twice you are quite likely to run into long path issues which causes this problem. The only way to install a tool is by not using the global flag but set the tool path to a shorter root path |
So any explanation why the |
The first layer of The layout for the tools folder where the tool will be installed is described below:
The CLI will obtain the tool through NuGet by generating a fake (temporary) project, with a reference to the tool package. One fake project will has one tool package reference. We will then do a restore on this project, passing the packages parameter to indicate where we want this package (and its dependencies) restored. To prevent normal package taking dependency on the tool package reference, NuGet will block package reference to a tool package type |
I just run into this issue, too. First installing a tool failed on a Windows 10 machine with dotnet 5.0.202 and after I found this issue here I tried with shortening the tool path. Now the installation went though, but starting the tool failed with a message like
And indeed, the complete path was 262 chars long. Shortening the tool path ( Are there any plans to address this problem for the upcoming .NET-6 release? A while back, I was quite exited by the BCL Team's announcement regarding MAX_PATH, but apparently there is still a long way to go... |
We are consistently hitting this on
|
@radical I believe dotnet/arcade#8160 should fix the problem. |
I get error when installing
dotnet tool
and seem related to long path(not sure if it's related to #10708)As you can see if I make path shorter it works. I'm ok with that, but error is a bit hidden and if I search around I found that code related to windows update, so it's not clear the workaround.
The text was updated successfully, but these errors were encountered: