Imir Hoxha
Imir Hoxha

Reputation: 1694

create a class library for a sharepoint project

I am trying to put my sharepoint code in an external library. Once I reference the dll in my project and when I do a deployment, I get an error saying that Could not load file or assembly. Can anyone tell me what should I do when creating my class library? what references do I have to include?

thank you for your help.

Upvotes: 5

Views: 3102

Answers (4)

Navish Rampal
Navish Rampal

Reputation: 482

Go to packages and add the External DLL's to the GAC

Upvotes: 0

Maks Matsveyeu
Maks Matsveyeu

Reputation: 866

You should both sign your class library and include it into your package. in order to include a library into a package go to package designer and click Advanced then add your library to the package from there via Add Custom Assembly.

Upvotes: 10

Swiftain
Swiftain

Reputation: 29

You can click on "advance" on the package designer and add your external dll, assuming you are using sharepoint 2010

Upvotes: 1

competent_tech
competent_tech

Reputation: 44921

If I recall correctly, sharepoint requires external assemblies be signed and loaded from the GAC. Are you installing your DLL into the GAC and is it signed?

Upvotes: 1

Related Questions