将.exe项目转换为类库 [英] Converting .exe project to class library

查看:172
本文介绍了将.exe项目转换为类库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在visual studio 2010 Ultimate中有一个半大的C#.exe项目,我想将其转换为DLL类库。有没有一个简单的方法来做,不涉及创建一个新的类库项目?感谢提前。

I have a semi-large C# .exe project in visual studio 2010 Ultimate, and I would like to convert it to a DLL class library. Is there an easy way to do this that doesn't involve creating a new class library project? Thanks beforehand.

推荐答案

项目>属性>应用程序选项卡,将输出类型更改为类库。

Project > Properties > Application tab, change Output type to "Class Library".

对于记录,实际上并不是必需的。一个EXE项目可以作为一个程序集参考。假设课程被宣布为公开的,你可能还需要修正,以使他们在图书馆工作。

For the record, this isn't actually necessary. An EXE project works fine as an assembly reference. Assuming classes were declared public, something you might have to fix anyway to make them work in a library.

这篇关于将.exe项目转换为类库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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