Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: all • Supported versions: 4.8+
NuGet.exe 4.8 and later support long paths for files and directories for scenarios like Pack, Restore, Install, and most other scenarios that need file paths.
Required Operating System
- Windows 10 (version 1607 or later)
- Windows 10 (July 2015 release or version 1511) if you upgrade .NET Framework to versions 4.6.2 or later.
- Windows Server 2016 (all versions)
Enable "Win32 Long Paths" Group Policy
One needs to enable long path support on those systems by setting a group policy.
Steps:
- Launch Group Policy Editor - Type "Edit group policy" in the Start search bar or Run "gpedit.msc" from the Run command (Windows-R).
- In the Local Group Policy Editor, enable "Local Computer Policy/Computer Configuration/Administrative Templates/All Settings/Enable Win32 long paths".

Note
Enabling Other NuGet Tools to Support Long Paths
- Dotnet CLI supports long paths regardless of the operating system or version.
- Visual Studio or
msbuild -t:restoredoes not yet support long paths. - Software that uses NuGet Libraries to execute restore and other commands, will support long paths on the same systems that NuGet.exe works on, if they also set
longPathAwarein their windows manifest and configureUseLegacyPathHandlingtofalsevia App.Config See more information