完成项目到dll [英] completed project to dll

查看:83
本文介绍了完成项目到dll的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将已完成的C#项目转换为dll.例如,我做了一个很好的C#项目,并想在其他项目中使用它.

我已经在Google上搜索过,但是很多人都在讲开放类库,并在类库中编写您的代码.然后构建解决方案,一切都很好.

但是我的问题是如何将完成的项目转换为dll.(例如,也许项目可以包含许多Forms等.)

How Can I convert to completed C# project to dll . For example I made a good C# project and I want to use it in other projects.

I have googled but lots of them are telling open class library and write your codes in Class library.Then Build Solution and everything is ok.

But my question is how can I convert completed project to dll.(For example;maybe project can include lots of Forms etc.)

推荐答案

首先要取决于您编写项目的方式.

首先尝试的是:
1)在VS中打开您的解决方案
2)在解决方案资源管理器"窗格中,右键单击项目",然后选择属性"
3)在显示的属性"页面中,选择应用程序"选项卡.
4)在页面的右侧是一个下拉列表:输出类型".将其更改为类库"
5)重建

您将拥有一个可以导入其他项目的类库.
How easy this is to do will depend on how you wrote your project in the first place.

The first thing to try is:
1) Open your solution in VS
2) In the Solution Explorer pane, right click the Project and select "Properties"
3) In the Properties page that shows, select the "Application" tab.
4) On the right side of the page is a drop down list: "Output Type". Change that to "Class Library"
5) Rebuild

You will how have a class library you can import into other projects.



这篇关于完成项目到dll的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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