Monday, October 6, 2014

NuGet Error in Visual Studio - Specified path, file name or both are too long. 260 vs. 248

Trying to update some NuGet packages and had the package refuse to deploy giving this message:

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.
Solution:
Turns out that Visual Studio 2012 has a fixed limit length on property paths of 248 characters.
My package length was 260 characters.  The fix is to not nest your project so deep, ie. shorter paths!!

Microsoft know about the issue:

Hello everyone and thank you for the feedback and for voting on this issue. We understand that this can be a frustrating issue, however, fixing it requires a large and complicated architectural change across different products and features including Visual Studio, TFS, MSBuild and the .NET Framework. Dedicating resources to this work item would come at the expense of many other features and innovation. Additionally, if we removed this limitation from our first party tools it will still likely exist elsewhere in Visual Studio’s ecosystem of extensions and tools. For these reasons, we are declining this suggestion and returning return everyone’s votes so they can be applied to other items. In the interest of delivering the most value to our customers we sometimes have to make very difficult cuts, and this is one of them.
Thank you,
Will Buik,
Visual Studio – Project and Build Team


Source:
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2156195-fix-260-character-file-name-length-limitation

No comments:

Post a Comment