I created a project on Sharepoint 2010. I need a Third Part dll reference in order to solve a problem. After downloading the dll, putting it in the project, add the reference to this library and adding it to the package, I try do deploy the project.

I'm getting the following exception:

Error occurred in deployment step 'Add Solution': Could not load file or assembly or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.

It seems like dll framework version is 4.0 or 4.5.

What shoud I do?

  • Please mention in the question how it relates to SharePoint otherwise it looks like a pure .net question. Thanks.
    – SPDoctor
    Jan 3, 2013 at 18:20

1 Answer 1


Possibly third-party dll uses newer .NET version, than SP is based on. For instance, SP2010 is based on .NET 3.5, but dll was created for .NET 4.5. In such a case you can try to find third-party dll created for 3.5. You can check dll framework version in Visual Studio by clicking right button on it and looking at its properties.

Also possibly you selected incorrect framework for your project (it should be 3.5 for SP2010). You can change it in properties of the project.

  • In fact I searched for the source code, so I recreated the dll for .Net 3.5 Framework. It's really strange there is no other solution to this problem
    – MIlena
    Jan 3, 2013 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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