Click here to Skip to main content
15,890,376 members
Home / Discussions / C#
   

C#

 
QuestionArrays of Class instances -vs- Struct instances? Pin
Anonymous12-Mar-03 5:15
Anonymous12-Mar-03 5:15 
AnswerRe: Arrays of Class instances -vs- Struct instances? Pin
Paul Riley12-Mar-03 7:04
Paul Riley12-Mar-03 7:04 
GeneralRe: Arrays of Class instances -vs- Struct instances? Pin
Anonymous12-Mar-03 11:46
Anonymous12-Mar-03 11:46 
GeneralLooking for Software to document Programs Pin
STW12-Mar-03 5:00
STW12-Mar-03 5:00 
GeneralRe: Looking for Software to document Programs Pin
Paresh Gheewala12-Mar-03 7:45
Paresh Gheewala12-Mar-03 7:45 
QuestionHow to join a .NET dll and .NET exe into a Signle Exe? Pin
J0hn12-Mar-03 3:04
J0hn12-Mar-03 3:04 
AnswerRe: How to join a .NET dll and .NET exe into a Signle Exe? Pin
leppie12-Mar-03 4:06
leppie12-Mar-03 4:06 
GeneralRe: How to join a .NET dll and .NET exe into a Signle Exe? Pin
J0hn12-Mar-03 13:55
J0hn12-Mar-03 13:55 
AL cannot "join" exe and dll.

thanks anyway, any other idea?

What AL.EXE Does Not Do
While shipping two closely related but separate DLLs is not that much of a bother, it would be nice if, since they are so closely intertwined, we could merge the two different assemblies into one. The ability to merge multiple libraries together would simplify deployment in many cases; applications that use many different languages or large applications written in the same language but built upon many different projects would benefit from single-assembly deployment.

You might, at this point, expect me to introduce AL.EXE (assembly linker) as the utility that can link multiple modules into a single file for deployment. While many developers new to .NET believe this is what AL.EXE does (and the MSDN seems to imply that this is what AL.EXE does) that is actually not the case. It is true that you can use AL.EXE to create a new assembly DLL that seems to combine two or more assemblies into one with the command line command:

al CSharpClass.netmodule VBClass.netmodule /target:library /out:combo.dll

(NOTE: don't worry about the "netmodule" extension just yet, we will discuss it in a moment. For the moment, pretend that the netmodule keyword is simply a DLL extension)

You can then take a client application that requires both classes (CSharpClass and VBClass) and link it only to combo.dll such that we can have:

csc client.cs /r:combo.dll

as opposed to:

csc client.cs /r:VBClass.dll /r:CSharpClass.dll

However, this may lead the developer to believe that he has combined the two assemblies into one, and he can simply ship combo.dll with his client, and not including VBClass.dll or csharp.dll. But this is not the case. In fact, the developer must now ship combo.dll AND CSharpClass.netmodule and VBClass.netmodule, otherwise his application will not run.

We can see then, that while AL.EXE might make our compilation simpler, it does not really save us anything from a deployment perspective. So what is AL.EXE good for? The answer is for working with what are known as modules and compiling them into an assembly. We will see in the section after next, modules come into play heavily when we are writing international applications.

GeneralRe: How to join a .NET dll and .NET exe into a Signle Exe? Pin
leppie13-Mar-03 3:58
leppie13-Mar-03 3:58 
GeneralRe: How to join a .NET dll and .NET exe into a Signle Exe? Pin
J0hn13-Mar-03 14:40
J0hn13-Mar-03 14:40 
QuestionC# and comm port... How? Pin
nikulin_andrey11-Mar-03 23:43
nikulin_andrey11-Mar-03 23:43 
AnswerRe: C# and comm port... How? Pin
Victor Vogelpoel13-Mar-03 8:51
Victor Vogelpoel13-Mar-03 8:51 
QuestionCollections - what is the assignment? Pin
Anonymous11-Mar-03 23:16
Anonymous11-Mar-03 23:16 
AnswerRe: Collections - what is the assignment? Pin
Nathan Blomquist12-Mar-03 5:41
Nathan Blomquist12-Mar-03 5:41 
GeneralRe: Collections - what is the assignment? Pin
Don Miguel12-Mar-03 19:41
Don Miguel12-Mar-03 19:41 
GeneralRe: Collections - what is the assignment? Pin
Nathan Blomquist13-Mar-03 3:12
Nathan Blomquist13-Mar-03 3:12 
GeneralRe: Collections - what is the assignment? Pin
Don Miguel13-Mar-03 3:16
Don Miguel13-Mar-03 3:16 
Questionhow to add reference to Project Pin
henrykao11-Mar-03 18:34
henrykao11-Mar-03 18:34 
AnswerRe: how to add reference to Project Pin
Paul Riley12-Mar-03 7:14
Paul Riley12-Mar-03 7:14 
GeneralRe: how to add reference to Project Pin
henrykao12-Mar-03 15:00
henrykao12-Mar-03 15:00 
Generalwhy can not find particular reference in the project/Add reference Pin
henrykao11-Mar-03 18:08
henrykao11-Mar-03 18:08 
GeneralRe: why can not find particular reference in the project/Add reference Pin
Craig Collier12-Mar-03 12:13
Craig Collier12-Mar-03 12:13 
GeneralRe: why can not find particular reference in the project/Add reference Pin
henrykao12-Mar-03 15:07
henrykao12-Mar-03 15:07 
GeneralRe: why can not find particular reference in the project/Add reference Pin
Danny Blanchard12-Mar-03 19:23
Danny Blanchard12-Mar-03 19:23 
GeneralI have a question about MDI window Pin
JiangHaiLong11-Mar-03 17:48
JiangHaiLong11-Mar-03 17:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.