将完成的项目转换为 DLL [英] Convert a completed project to a DLL
问题描述
如何将完成的 C# 项目转换为 DLL,以便在其他项目中使用它?
How can I convert a completed C# project to a DLL, in order to use it in other projects?
我用谷歌搜索过,但很多结果都说打开类库,在那里编写代码,然后构建解决方案,一切都会好起来的.
I have Googled but lots of results say to open the Class Library, write your code there, then Build Solution and everything will be ok.
但我的问题是:如何将完成的项目转换为 DLL?项目可以包含大量的表单等.
But my question is: how can I convert a completed project to a DLL? The project can include lots of Forms etc.
推荐答案
如果你的代码是完整的,你需要用它创建一个 Class 项目,如果你已经有一个项目,那么只将有用的代码转移到 class 项目中在其他项目中重复使用
if your code is complete, you need to create a Class project out of it, if you already have a project then only transfer the useful code to the class project for reuse in other projects
或更改输出类型
到类库,你可以在你的项目属性标签页应用下找到
or change the Output Type
to class library, you can find that in your project properties under the tab application
这篇关于将完成的项目转换为 DLL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!