I have a C# project. It's possibile save my forms as DLL, so I can call it?
Thanks.
Save a form as DLL
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
AlanRank #669 · 3.6K reputationPosted Oct 16, 2007, 5:38 AM EDT
Yes, it's possible.
If you right click on the Project name in Solution Explorer, select properties and then the Application tab, there's a setting called "Output type" which needs to be changed from Windows Application to Class Library. The file called (or originally called) program.cs, which contains the Main() method, should be also be removed from the project before rebuilding as you don't need this for a dll.
Needless to say, make sure you back up the existing solution before attempting this so you can return to that if something goes wrong.
Angelo3 reputationPosted Oct 16, 2007, 6:03 AM EDT
I will try.