Converting .exe project to class library

SuperTron picture SuperTron · Dec 15, 2011 · Viewed 14k times · Source

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.

Answer

Hans Passant picture Hans Passant · Dec 15, 2011

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.