我可以分享我的图书馆所有的应用程序?我的、有的、应用程序、图书馆

2023-09-04 03:02:21 作者:在那以后.

我有一个项目(.NET 4,但我也有.NET 4.5)总是使用同一个DLL我做了(这是我的数据层,更多或更少)。

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.

我想与大家分享这个图书馆我必须对每个应用程序,所以如果我做一个更新我会更新只是一个文件夹,我也不需要复制/粘贴库每个Bin文件夹上每个Web应用程序。

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.

这可能吗?

比如,如果我创建我的课 MyClass2013 ,这将可为每个Web应用程序,当我打开Visual Studio的:

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()

没有复制粘贴彬的DLL(在那里我有这个类/方法的定义等)每一次,每一个应用程序,保持所有这些更新的,如果我做了一些修改。

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!

推荐答案

通过贵矿datalayer的项目,如果你把它编译成一个文件夹,例如c:/ DLL_Library

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

说DLL的路径现在是C:/DLL_Library/mine.DLL

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

这DLL_Library文件夹然后可以容纳任何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)

说你的项目都在C:/项目/

Say your projects are all in C:/Projects/

在每个项目中,您只需简单地引用的DLL在C:/DLL_Library/mine.DLL和DLL的这个库复制到任何机器编译你的其他项目

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。该电动工具Visual Studio的插件升级引用向导在一个不错的方法。

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