How to convert DLL to EXE in c#.net?

QuestionsCategory: C#How to convert DLL to EXE in c#.net?
Pooja PatelPooja Patel asked 5 months ago

How to convert DLL to EXE in c#.net?

1 Answers
Best Answer
Mahesh DeshmaneMahesh Deshmane answered 4 months ago

Assuming you are trying to convert a .dll project to .exe using visual studio.
to convert .dll project to .exe project we need entry point or equivalent function (normally main() function)
an entry point is where the first instructions of a program are executed, and where the program has access to command-line arguments.
if you do not have entry point then define one like


static void Main()
{

          //Call the method of .dll file which you want to execute when the program executes
}

above code snippet syntax may be different based on language

Follow the below steps:
1. Make sure .dll file has an entry point
2. open solution
3. right-click on the project you want to compile into .exe -> Properties
4. In the application tab, changes the output type to suitable type (either windows application or console application)
dll to exe visual studio project properties