Path Length Limitation When Creating a Visual Studio Project

I recently had to create a project with a very long name inside a Visual Studio solution that was stored at a specific path (long also) on the hard drive. When I tried to create the project within Visual Studio 2008 I got an error message saying that the resulting path of the new project would be too long.

The solution I found is a workaround: I created the new project using a different directory base (C:Temp). The project was successfully created and added to the solution this time. I then removed the project from the solution, closed Visual Studio environment, and moved the files from C:Temp to the base directory of the solution (the folder that has a long path string). I opened the solution again using Visual Studio and I used Add Existing Project to add the project to the solution. It worked correctly, and I could then add items, references, and build the project without any side effect.

Maybe this workaround can help somebody else too.

About Sorin Dolha

My passion is software development, but I also like physics.
This entry was posted in Computers and Internet. Bookmark the permalink.

5 Responses to Path Length Limitation When Creating a Visual Studio Project

  1. Tudor Turcu says:

    Do you remember which was the value of that maximum length you encountered?

  2. Sorin says:

    The maximum length value from the OS is 240 if I remember correctly, but Visual Studio reserves 80 characters for files inside the solution/project, so it limits it even further.

  3. kavyaa says:

    maximum value check

  4. GarryBrown says:

    Thanks for the information. Also try Long Path Tool. It helped me with Error 1320 in Win 7.😉

  5. andrewop says:

    Long Path Tool can be used to sort out this problem

    ________________

Add a reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s