When I install nuget packages with long file names I get following error: 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. Also it seems when project path is long we get this error beacause specified path is long in this case.
Is there any solution to solve this problem so that I be able to install nuget packages with long file names?
Is there any solution to solve this problem so that I be able to install nuget packages with long file names?
The easiest way to avoid this issue is to move your source to the C:/ drive (or another location with fewer characters in the path) or install the long path tool.
Besides, you can create nuget.config
and store it in the same location as your solution file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
<add key="repositoryPath" value="C:\MyPackagesFolder" />
</config>
</configuration>
This would change the default packages folder for the configuration level you put the file in. Obviously you can put whatever path you want.
See Configuring NuGet behavior for more information.
Hope that helps
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With