Converting Console to Class library.

Rajesh Enjapuri

New member
May 21, 2019
Programming Experience
Can we convert a class console application to class library? if it is possible then please explain in steps.

Thanks in Advance.
You can specify that a project should be built to a library rather than an application in the project properties. Explore a bit and you'll find it, as well as various other things that it would be useful to know about. Of course, a library doesn't have an entry point so your Main method won't be used at all, so you should consider whether some or all of its functionality needs to be moved elsewhere.
It may also help if you tell us why you need to do this conversion.

If all you need is to be able to run Xunit tests against your existing code, Xunit does not care if your code is compiled as a class library or a console application or a Windows application.
Top Bottom