开发者

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

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. (excep开发者_如何学运维tion 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?


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.


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...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜