Solved

Error adding new project to solution in Visual Studo 2010

Posted on 2011-09-21
4
1,704 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Problem to copy file 14 53
disadvantage of code behind appoarch in asp.net 3 29
CSS for Popup in ASP.NET 4 19
Check only one toolstripmenu item 12 30
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

726 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