Solved

Error adding new project to solution in Visual Studo 2010

Posted on 2011-09-21
4
1,642 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
  • 2
  • 2
4 Comments
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
Could you post a screen shot of your Add New Project form when you type in the information?
0
 

Author Comment

by:Courts-Tech
Comment Utility
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
Comment Utility
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
Comment Utility
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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now