Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question
    
Please mention in the question how it relates to SharePoint otherwise it looks like a pure .net question. Thanks. –  SPDoctor Jan 3 '13 at 18:20
add comment

1 Answer

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.

share|improve this answer
    
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 '13 at 21:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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