什么是创建公共库/实用程序的最佳方法? [英] What can be the best way to create common libraries/Utilities?

查看:78
本文介绍了什么是创建公共库/实用程序的最佳方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我的要求是创建可以在所有项目中使用的公共库。

在登录,身份验证等所有项目中都有一些相同的过程。

我确实有一些方法可以创建DLL,共享类等,但需要更多的建议我可以创建通用实用程序,它可以在任何项目中使用。



希望你们都可以帮助我。

提前谢谢你。

Hello everyone,

My requirement is to create common library which can be used across all projects.
There are some process which are same in all projects like login, authentication etc.
I do have some ways like creating DLL, Shared classes etc but need more suggestions with which I can create common utility and it can be used in any project.

Hope you all can help me out.
Thank you in advance.

推荐答案

1.您应该创建一个不必依赖于特定应用程序中任何其他项目的库项目(DLL),然后将可重用代码放入其中。



然后通过在每个应用程序解决方案中添加此现有项目(通过使用解决方案资源管理器中的添加现有项目)在所有应用程序中共享此实用程序项目。



2.如果您不想要真正的库,其他解决方案可能是创建项目模板(已经实现了一些基本的通用部分),然后使用它们来创建类似的应用程序。有关详细信息,请参阅 MSDN。 [ ^ ]
1.You should create a Library Project (DLL) that must not depend on any other project from your specific application, then put into it the reusable code.

Then share this utility project in all your applications by adding, in each application solution, this existing project (by using Add Existing Project from Solution Explorer).

2.If you do not want a real library, other solution could be to create project templates (that have some basic common parts already implemented) then to use them for creating similar applications. For details about this see in MSDN.[^]


这篇关于什么是创建公共库/实用程序的最佳方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆