Click here to Skip to main content
15,886,689 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Good morning ever one...


i'm created a project of window application in c#..it's working.. now i want to create a dll's for each form in that project.

How to create the dll's for individual window forms? how can combine all the dlls and use like a one project..
Posted
Comments
Sergey Alexandrovich Kryukov 28-Feb-13 0:50am    
Please don't get offended by my question: how come you are the author of 9 answers in this forum, if you did not yet learn the very basics? It's perfectly fine to be a beginner, but answering...
—SA

1 solution

Change assembly output type to "Class Library". With Visual Studio, it will be in project Properties, "Application" tab. Remove entry point (Main) and perhaps its class, but only because they won't be needed. And, preferably, renamed the output file of the assembly.

However, you don't have to do anything: you should understand that any application-type assembly can be referenced as any other assembly. Essentially, in .NET there are no DLLs, non-DLLs or EXEs. These are only usual customary file names which do not matter much. There are only assemblies made of one or more executable modules, but Visual Studio supports only one module per assembly. (But modules still exists, you can check them up by Reflection.)

The only thing which really matters is the types and their members contained in the assembly, which can be exposed by the public access modifiers. Then you can reference this assembly and use those types and members. Forms or not, it does not matter. Anything.

Yes, I advised to rename the output file to *.DLL, but only to help you to avoid accidents, when someone tries to execute your library as application. If you don't remove the entry point, it will be even executed, but this is not your purpose.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900