Solved

Error adding new project to solution in Visual Studo 2010

Posted on 2011-09-21
4
1,722 Views
Last Modified: 2012-05-12
I have a pecular problem.  I am currently working on a VS2010 solution.  In this solution, there are several projects who's path lengths are 168+ characters long.  When I attempt to add a project to this solution, the following error appears when I am typing the 156th character of the path:

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

After doing a bit of research, I read that the path length could not be more than 259 characters.  Why is this error appearing when the length is plenty below the 259 char limit?  Does anybody know how to view/edit where this limit is set?  Can this limit be changed?

Thanks,

Sergio
0
Comment
Question by:Courts-Tech
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40
ID: 36576242
Could you post a screen shot of your Add New Project form when you type in the information?
0
 

Author Comment

by:Courts-Tech
ID: 36576386
Sure.  Here it is.  The error occurs when I try typing the "P" after "IDE" Error when attempting to add project to solution.
0
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 250 total points
ID: 36576782
Just for the root directory of your new project, you need at least 184 characters:

"C:\Users\valdez\Documents\Visual Studio 2010\Projects\CIV-159464\IDEP - Indigent Defense Enhancement Project\DEV\Travis.Courts.IDEP\Travis.Cours.Model.IDE\Travis.Cours.Model.IDE.vbproj"

Do not forget that the system must also create directories under the one you are specifying. If you add the following, that is typically created in many C# applications, we are up to 254:

"\ojb\Release\Travis.Court.Model.IDE.csproj.ResolveComReference.cache"

This is in a Windows application. Could it be worse in an ASP application?

Awfully close to the limit if 259 is really the limit.

Then, the maximum of 259 is not an absolute. You read different values depending on where you look at. It depends not only on the operating system, but also a few other factors such as the way the hard disk is formatted. Unfortunately, they were not nice enought to give us that through a property somewhere in the framework.

And I am quite sure that Visual Studio is conservative about the maximum number of characters. It may for instance take into accounts the indirection that the system use for compatibility with old systems. C:\Users can also be called by C:\Documents and Settings. I would rather be told when creating a project that I am close to the limit, than end up with an error in the middle of development.

The solution might not be to your liking, but it would be to create that project somewhere else. Why not store the new project under your DEV subfolder?

And you will have learned something. Give shorter name to your project directories. Personnaly I even moved mine under C:\Prog, a lot shorter than C:\Users\<Name>\Documents\Visual Studio 2010. It is evident that those guys never worked on computers with cramped hard disks and memory.
0
 

Author Comment

by:Courts-Tech
ID: 36576966
Thanks, that makes sense.  By the way, I did find a workaround for this.  Using another instance of VS2010, I created the project under C:\Temp.  I then copied the project to my original solution path, then use the Add An Existing Item function.  It worked.  I will consider moving the solution to another location to avoid any this problem in the future.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question