Any way to convert class library function into exe?
You can change the output type of your project in it's settings, then add a main entrypoint, as others have mentioned (Note, you want "Windows application", not "Console Application" here):
If you can't change the source for some reason, you can create a new very simple application (an .exe), and call public methods in your .dll from it:
namespace YourNamespace
{
internal class YourApp
{
private static void Main(string[] args)
{
// Call your function here.
}
}
}
To do this, you just need to include a reference to the existing .dll into this new application.
In the properties of the project -> application tag, change the Output type to console Application. Anyway, you need to create a static Main()
method as a starting point.
static void Main(string[] args)
{
}