Visual Studio 2010: MVC project : filename or extension is too long. (exception from hresult: 0x800700ce)

2

I always like to name my projects with there names so like so: myname.myproduct.Web.csproj for example.

This has always worked well for me, does anyone have an alternative?

The problem now is I created an MVC project and name my project using my long namespace name, and it asked me if I wanted a test, I said yes, and now it gives me the error:

    filename or extension is too long. (exception from hresult: 0x800700ce)

Now checking my solution, I see that the Test project is missing.

My location for my Projects directory is c:\users\nameofuser\......documents\visual studio 2010 .... etc, basically the default.

Has anyone else had this, I presume its the path is too long.

Should I move my source outside of c:\users? Stop naming my projects with their namespace names?

asp.net-mvc
visual-studio-2010
asp.net-mvc-3
namespaces
asked on Stack Overflow Jun 20, 2011 by Martin • edited Feb 18, 2020 by halfer

2 Answers

3

Yes, copying your solution to c:\work might give you some more available "space" in the paths. I think the limit is around 255 chars. Another technique is to omit the namespace when you create the projects within the solution and modify the default namespace and assembly name immediately in the project properties. In this case your folders and project names are short, but you still have "nice" namespaces and assembly names.

answered on Stack Overflow Jun 20, 2011 by Tz_
1

I had a similar problem a few years ago with VS 2005. What I did was move my projects to the root drive so the path was shorter.

Like:

c:\projects\blah...

answered on Stack Overflow Jun 20, 2011 by cbmeeks

User contributions licensed under CC BY-SA 3.0