I was creating a solution file for an application at a client and I got this error message.
Sara Ford explains why this happens here. The OS limit is 260 chars for the MAX_PATH variable according to Sara Ford’s blog.
So how do you get around it? In this case, Visual studio was creating a folder for my solution. So I just created a solution somewhere else on the system and copied it over to my destination folder. I knew that the files wouldn’t be exceeding the 260 character limit anytime soon so it wasn’t a problem.
But what if you do need to exceed the file path? Easy, create a file share. Share a folder as a new drive on your machine, then create the solution on the new share (its still in the old folder) but you’re referencing it with the new path. Kind of a kludge, but it works.