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

Paket exe can't handle paths that are longer than 260 characters. #949

Closed
baronfel opened this issue Jul 31, 2015 · 13 comments
Closed

Paket exe can't handle paths that are longer than 260 characters. #949

baronfel opened this issue Jul 31, 2015 · 13 comments

Comments

@baronfel
Copy link
Contributor

Between version 1.19.6 and 1.19.7 Paket became unable to handle paths longer than 260 characters. any paket operation, whether via command line or VS integration, blows up with a PathTooLongException now in a solution we have that is a web app, and so has very long nested node_modules directories.

@baronfel
Copy link
Contributor Author

Detailed stack trace:

Paket failed with: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters. StackTrace: at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetDirectoryName(String path) at System.IO.FileSystemEnumerableIterator1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) at System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array)
at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di)
at Microsoft.FSharp.Collections.ArrayModule.Collect[T,TResult](FSharpFunc2 mapping, T[] array) at <StartupCode$Paket-Core>.$ProjectFile.search@55-2(String pattern, DirectoryInfo di) at Paket.ProjectFile.FindAllProjects(String folder) at Paket.InstallProcess.findAllReferencesFiles(String root) at Paket.UpdateProcess.SmartInstall(String dependenciesFileName, Boolean updateAll, FSharpOption1 exclude, UpdaterOptions options)
at <StartupCode$Paket-Core>.$PublicAPI.Install@156.Invoke(Unit unitVar0)
at Paket.Utils.RunInLockedAccessMode[a](String rootFolder, FSharpFunc2 action) at Paket.Program.handler@280-10.Invoke(ArgParseResults1 results)
at Paket.Program.processWithValidation[T](FSharpFunc2 validateF, FSharpFunc2 commandF, Command command, String[] args)
at Paket.Program.processCommand@71-1.Invoke(Command command, String[] args)
at Paket.Program.main()`

@forki
Copy link
Member

forki commented Jul 31, 2015

@baronfel
Copy link
Contributor Author

we could try adding support for the \\?\<FILEPATH> syntax, which opts-in to long path support in win32: http://blogs.msdn.com/b/bclteam/archive/2007/02/13/long-paths-in-net-part-1-of-3-kim-hamilton.aspx

@ChrisMcKee
Copy link

+1 When it does find all refs is it scanning all the folders? Just wondering as I have a 'master' folder in my repo which isnt part of the solution, in there is some frontend crap for gulp that handles live reload etc; It's only the npm folder in here that exceeds the win limit (mostly caused by lodash dependencies). But I wouldn't expect Paket to be looking at anything thats not in SLN/CSProj

@forki
Copy link
Member

forki commented Jul 31, 2015

could you please check if 1.22.0-alpha005 fixes it?
you can use paket.bootstrapper.exe prerelease to get that version

@baronfel
Copy link
Contributor Author

it does fix the issue for me. Thanks for the quick turnaround, @forki.

@forki
Copy link
Member

forki commented Jul 31, 2015

ok cool. will release a proper version.

@forki forki closed this as completed Jul 31, 2015
@forki
Copy link
Member

forki commented Jul 31, 2015

@ChrisMcKee
Copy link

Yup that wins :) Thanks

@baronfel
Copy link
Contributor Author

can you also push an update of Paket.VisualStudio to contain this fix? It's a bit of heartburn for us without it.

@forki
Copy link
Member

forki commented Jul 31, 2015

Already done
On Jul 31, 2015 20:32, "Chester Husk III" notifications@github.com wrote:

can you also push an update of Paket.VisualStudio to contain this fix?
It's a bit of heartburn for us without it.


Reply to this email directly or view it on GitHub
#949 (comment).

@bhugot
Copy link
Contributor

bhugot commented Mar 17, 2017

Hi,

I still get the issue especially with the new core libs which have really long name like
runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl

@AndyBehr
Copy link

The PathTooLong Exception is still happening
Paket failed with: -> PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

What broke it again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants