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

Error with long paths from Nuget.core codebase #1361

Open
nmulvihill opened this issue Jul 14, 2017 · 6 comments
Open

Error with long paths from Nuget.core codebase #1361

nmulvihill opened this issue Jul 14, 2017 · 6 comments
Assignees
Labels
0 - Backlog Blocked - External Bug CoreTeam Customer Requires NuGet.Client Change This issue requires a modification to something in referenced NuGet.Client library.
Milestone

Comments

@nmulvihill
Copy link

What You Are Seeing?

Long file paths error out due to Nuget.core codebase

What is Expected?

installation of an application with file paths longer than 260 characters

How Did You Get This To Happen? (Steps to Reproduce)

tried installing an application with file paths longer than 260 characters (BMC)

Output Log

Chocolatey v0.10.7
Installing the following packages:
bmc
By installing you accept licenses for the packages.
Progress: Downloading bmc 9.0... 100%
bmc not installed. An error occurred during installation:
The specified path, file name, or both are too long. The fully qualified file n
ame must be less than 260 characters, and the directory name must be less than 2
48 characters.
bmc package files install completed. Performing other installation steps.
The install of bmc was NOT successful.
bmc not installed. An error occurred during installation:
The specified path, file name, or both are too long. The fully qualified file n
ame must be less than 260 characters, and the directory name must be less than 2
48 characters.

Chocolatey installed 0/1 packages. 1 packages failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

bmc (exited 1) - bmc not installed. An error occurred during installation:
The specified path, file name, or both are too long. The fully qualified file n
ame must be less than 260 characters, and the directory name must be less than 2
48 characters.

relates to issue 934: #934

@ferventcoder
Copy link
Member

Thanks for logging this - Added an issue at chocolatey/nuget-chocolatey#15 to reference and will update this issue when that closes. Thanks!

@ferventcoder
Copy link
Member

Sorry, wrong button :/

@Iristyle
Copy link

Also running across the same problem. I've packaged up the Visual Studio 2017 compiler toolchain into an offline install choco package, but can't get it to actually extract / start the install unless I specify a shorter temp directory..

--cache-location= allows the install to proceed, but the temp directory layout still consumes a good chunk of additional path - i.e. with --cache-location=c:\msvc\ I lose 62 characters in the scratch directory that is calculated like C:\msvc\NuGetScratch\79718448-98f9-4a01-a768-548c06555e8c\locte2r0.oaj\tools where 8 or 10 characters would probably be sufficient.

@ferventcoder ferventcoder modified the milestones: 0.10.8, 0.10.9 Aug 29, 2017
@ferventcoder ferventcoder modified the milestones: 0.10.9, 0.10.10 Feb 27, 2018
@ferventcoder ferventcoder modified the milestones: 0.10.10, 0.10.11 Mar 27, 2018
@ferventcoder ferventcoder modified the milestones: 0.10.11, 0.10.12 May 3, 2018
@ferventcoder ferventcoder modified the milestones: 0.10.12, 0.10.13, 0.10.14 Mar 9, 2019
@ferventcoder ferventcoder modified the milestones: 0.10.14, 0.10.15 Apr 1, 2019
@gep13 gep13 modified the milestones: 0.10.15, 0.10.16 May 31, 2019
dpk25 added a commit to CU-CommunityApps/choco-packages that referenced this issue Jun 5, 2019
@tallandtree
Copy link

Will this be solved? I've the same issue.

@pauby pauby modified the milestones: 0.10.16, 0.10.x May 11, 2021
@TheCakeIsNaOH TheCakeIsNaOH added the Requires NuGet.Client Change This issue requires a modification to something in referenced NuGet.Client library. label Feb 4, 2022
@TheCakeIsNaOH
Copy link
Member

This should have been fixed in Chocolatey v2.0.0, as newer NuGet versions directly use System.IO, and those are long path compatible, assuming they are enabled in .Net framework. NuGet/Home#6937

I'm not seeing a reproduction for this issue, so I'm not sure exactly how to test this to confirm that it is definitely fixed.

@corbob
Copy link
Member

corbob commented Jul 17, 2023

I think I have some repro very basic steps here:

choco new pkg --version 1.0
rm pkg/tools/*
new-item "pkg/tools/$("$(new-guid)/"*6)file.txt" -force
choco pack pkg/pkg.nuspec
choco install pkg -s .

This is the output from 1.4.0:
2023-07-17_11-45-01

And new error from 2.x:
2023-07-17_11-47-04

I did also try to find a bmc package, but there doesn't appear to be any on CCR, so had to make my own package. It would be good to get proper reproduction steps and determine if this even was the issue originally reported (this one does feel quite contrived, so would be good to know if there are exampled where this is actually happening).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog Blocked - External Bug CoreTeam Customer Requires NuGet.Client Change This issue requires a modification to something in referenced NuGet.Client library.
Projects
None yet
Development

No branches or pull requests

8 participants