How to reference a C # class library project in Visual Studio 2010?

I'm new to visual studio and wondered how to set up visual studio 2010 so that I can reference my Windows C # class library project. I currently have a solution with two projects - the C # library project and the unit test project.

What is the best way to create multiple clients that will use this library? Should they be their own solution or just another project in a library solution? How to use classes in a library function from a project that references a library project?

+6
source share
2 answers

You can add a link to the library by right clicking on the node links in the solution explorer and selecting req. Lib ...

When all your consuming applications are in one solution, I would prefer to place lib also inside sln, otherwise I would use additional sln

+12
source

Right-click the client project β€œLinks” β†’ Add link Go to the β€œProjects” tab if the class library is in the same solution. Else Browse and select your class library dll.

If the class library will not be released as a regular dll for several projects, it is better to add them all to the same solution.

+10
source

Source: https://habr.com/ru/post/898341/


All Articles