I have created a SharePoint 2010 web part through Visual Studio 2010. All works nicely. However, I have several web parts to build in total and I have a class library that will contain standard methods I can reuse. When I add this class library to my web part solution I get an error when deploying to SharePoint:-

"Could not load file or assembly 'SPUtilities, Version=, Culture=neutral, PublicKeyToken=2986f17b005315a6' or one of its dependencies. The system cannot find the file specified."

What am I missing? I cannot seem to find any documentation on this on the internet - all examples show just the creation of a web part.

Thanks in advance.

  • OK, so I figured out the problem was because my class library wasn't being registered with the GAC. I know when I built SP2007 projects with SPVisualDev it automatically registered dll's with the GAC. Is there a way to do this when creating web parts in VS2010, or will I need a custom script when deploying to do this? – grimorde Nov 10 '10 at 11:28

After some messing around with the project I found the 'Advanced' tab on the Package.package design view that allows me to select extra project outputs to include in the build.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.