Visual Studio 2010 – SharePoint (There are no Content Types in the Project)

I came across this error when trying to create a new list definition based on a content type that i have defined in my project.

I was so confused as to why this suddenly started happening, i thought i may have been when i placed my solution into source control, however after 5 hours of testing, re-writing the code again thinking that my project was broken it suddenly clicked what had happened.  Basically you cannot place a SharePoint Project into a Solution Folder.  Doing this causes Visual Studio to loose its ability to locate your SPI’s in your project.  Removing the project from the folder and back into the root of the solution fixed the problem.

I hope that this helps people save many hours of lost time like i did.

Chris

I am the SharePoint Development Lead at ICS Solutions Ltd. As well as broad knowledge in SharePoint 2007, 2010 & 2013 my specialities lie with SharePoint Branding, WebPart Development and JQuery integration.

5 Comments on "Visual Studio 2010 – SharePoint (There are no Content Types in the Project)"

  1. Max Mulawa says:

    Hi,

    Cheers for this one, your tip saved me a lot frustration.

  2. administrator says:

    No Problem :)

  3. Daniel says:

    Thanks for this one.

    SharePoint Software Factory uses exactly those solution folders. The normal templates show this error after i used SPSF.

    Cheers.

  4. Adrian Hilder says:

    Temporarily dragging the project out of the solution folder, adding the list definition and dragging it back again also works around this if for some reason you *really* want projects in solutions folders (wouldn’t be my choice!).

  5. Jacques says:

    O, wow, I more descriptive error message by Visual Studio would’ve been nice though. Thanks for the post. You potentially saved me days of figuring this one out.

Got something to say? Go for it!