Click here to Skip to main content
11,718,016 members (83,168 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
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 27-Feb-13 18:35pm
Comments
Sergey Alexandrovich Kryukov at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 215
1 F-ES Sitecore 210
2 Maciej Los 140
3 Jochen Arndt 120
4 Andy Lanng 115
0 Sergey Alexandrovich Kryukov 1,649
1 OriginalGriff 535
2 Maciej Los 529
3 Richard MacCutchan 440
4 CHill60 415


Advertise | Privacy | Mobile
Web01 | 2.8.150901.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100