Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting .exe project to class library

Tags:

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.

like image 347
SuperTron Avatar asked Dec 15 '11 18:12

SuperTron


People also ask

How do I change console application to class library?

In the Solutions Explorer window, right-click the exe project and then select Properties in the popup. Then change the Output type from Windows Application to Class Library.

How do I add a class library to my project?

Right-click on the solution in Solution Explorer and select Add > New Project. On the Add a new project page, enter library in the search box. Choose C# or Visual Basic from the Language list, and then choose All platforms from the Platform list. Choose the Class Library template, and then choose Next.

Can we convert DLL to EXE?

You cannot just simply convert any . dll file to program executable .exe. This is more a work for a programmer, not a simple conversion any user can make with some kind of utility.


1 Answers

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

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.

like image 127
Hans Passant Avatar answered Oct 09 '22 01:10

Hans Passant