Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error adding new project to solution in Visual Studio 2010 Path Length

Tags:

I am a bit baffled. I am creating a new solutions with some namespaces that are consistent with the framework I am working at the moment.

When adding a new project the total chars is 150 way below 255.

Why do I get this error when adding a project?

"The length of the full path for the solution ,project or item you are creating exceeds the maximum length allowed by the system.You must reduce the length of the name or the location"

What is the rule? How many chars I am really allowed?

thanks

EDIT

Just found a link which says that the path is calculated : see link http://social.msdn.microsoft.com/forums/en-US/csharpide/thread/d614d0ba-eea2-444b-9be8-7fe4fb85a226/

  Path length + 1 (separator) +    Solution name length + 1 (separator) +    Project name length + 1 (separator) +    Project name length +    80 (Reserved space) 
like image 903
user9969 Avatar asked May 14 '12 10:05

user9969


People also ask

How do I add a file path in Visual Studio?

In Visual Studio, click Tools > Options. Expand Projects and Solutions and click Locations. The Projects location field defines the default location for storing new projects. You can change this path if you are using a different working folder.


2 Answers

I found once my project is created, I can then change my project to a longer name. Project name change doesn't seems to have this number of characters limitation.

-- An update on 7/Mar/2018 -- In Windows 10, you can actually disable the Max Path Length limitation.

like image 104
Kelvin Avatar answered Sep 21 '22 16:09

Kelvin


This is just a variation on @Kelvin's answer, but you can create a new project in a location with a short path, e.g., c:\temp. Then move the project folder tree into the framework you're working on.

like image 27
Journeyman Avatar answered Sep 22 '22 16:09

Journeyman