Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create a class library for a sharepoint project

Tags:

c#

sharepoint

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.

like image 467
Imir Hoxha Avatar asked Dec 06 '11 21:12

Imir Hoxha


People also ask

How do I create a class library project?

Creating the class library project. Create your class library project: In Solution Explorer, right-click on the ClassLibraryProjects solution file and from the context menu, select Add > New Project.

How to create a library in SharePoint 2019?

Create a library in SharePoint or SharePoint Server 2019 1 Go to the team site where you want to create a new document library. 2 On the menu bar, select New, and then select Document library. 3 Enter a name for the new library. 4 Select Create.

How do I create a stringlibrary project in Visual Studio?

On the Configure your new project page, enter ClassLibraryProjects in the Solution name box. Then choose Create. Add a new .NET class library project named "StringLibrary" to the solution. Right-click on the solution in Solution Explorer and select Add > New Project.

How do I add a library to a web part solution?

Navigate to the web part solution folder, and open the ./package.json file. Add an entry to reflect the library entry and its version to the dependencies section (you can find this in the package.json file of the library solution you're created earlier) as follows:


1 Answers

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.

like image 96
Maks Matsveyeu Avatar answered Sep 21 '22 07:09

Maks Matsveyeu