Can I share a mine library to all applications?

本小妞迷上赌 提交于 2019-12-22 13:57:25

问题


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.



来源:https://stackoverflow.com/questions/19132552/can-i-share-a-mine-library-to-all-applications

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!