Can I share a mine library to all applications?

2019-05-26 19:24发布

问题:

I have a project (.NET 4, but I can have also .NET 4.5) that always use the same DLL I've made (it's mine Data Layer, more or less).

Each website it's an application.

I'd like to share this Library I have to each application, so if I do an update I'll update only a "folder", and I don't need to copy/paste this Library on each Bin folder on each web application.

Is it possible?

Such as, if I create my class MyClass2013, it will be available for each web application when I load Visual Studio:

MyClass2013 myClass = new MyClass2013()

without copy and paste the Bin's DLL (where I have the definition of this class/methods and so on) every time, for every application, keeping all of them updated if I do some edit.

Thinks to the Library System for example: is accessible for each project, I import nothing!

回答1:

With your mine datalayer project, if you have it compile to a folder say C:/DLL_Library

Say the DLL path is now C:/DLL_Library/mine.DLL

This DLL_Library folder could then house any DLLs, either ones used by multiple projects or one project (although some form of management would be helpful)

Say your projects are all in C:/Projects/

Within each project you simply reference the DLL at C:/DLL_Library/mine.DLL and copy this library of DLLs to any machine that compiles your other projects.

P.S. The power tools Visual Studio addon upgrades the referencing wizard in a nice way.