You’ve may have noticed that sometimes your project name is too long where other times it is accepted in the New Project Dialog. As explained by Paul on the Visual Studio General Forums…
The OS limit is 260 characters (MAX_PATH). However, the computation is:
Path length + 1 (separator) + Solution name length + 1 (separator) + Project name length + 1 (separator) + Project name length + 80 (Reserved space)
The project name length is added twice: Once for the folder name and once for the file that holds your project itself (.vbproj, .csproj etc.). The 80 additional reserved characters are for the files that you place in the project. Most new project templates create several sub-folders for intermediate files that help with like intellisense and debugging. While we may not use the full 80 characters, it is a sensible limit.
Using Paul’s calculation above, let’s create a Max-Length project / solution named ThisSolutionIsThirtyFiveCharacters (35 characters long) at location C:\Documents and Settings\saraf\My Documents\Visual Studio 2005\Projects (73 characters long)
Doing the math, we get 73 + 1 + 35 + 1 + 35 + 1 + 35 + 80 = 261
So, VS will accept creating a solution / project ThisSolutionIsThirtyFiveCharacters at C:\Documents and Settings\saraf\My Documents\Visual Studio 2005\Projects.