Combining modules with the Assembly Linker

M

Mike Nau

I've been trying to get a concrete answer to this for the last few
days, but have come up short. I'm hoping someone here can help.

Is there a way to take a set of c# modules (c# code compiled using csc
with the /t:module option) and combine them into a single assembly
using the assembly linker or any other tool.

For example I have the following compiled c# modules:
foo1.netmodule
foo2.netmodule

I'd like to link them into a single .net assembly named foolinked.dll.

I have tried

al foo1.netmodule foo2.netmodule /target:library /out:foolinked.dll

This created foolinked.dll but when I explore it with ildasm, it only
contains the assembly manifest and points to foo1.netmodule and
foo2.netmodule.

Any help would be greatly appreciated.

Thanks,
Mike.
 
R

Rob Windsor [MVP]

Mike,

What you described is the expected result from the assembly linker. What you
created is a multi-file assembly that is made up of foolinked.dll,
foo1.netmodule and foo2.netmodule. When you deploy the DLL you must also
deploy the netmodule files as well.

As an aside this is the only way to create an assembly that contains code
from different languages.

I don't think there's any way to use the assembly linker to build a
single-file assembly from netmodules.
 
H

Huihong

AL does not merge files together, rather it inserts a
reference into the assembly.

You will have to use 3rd party tool to physically merge
modules/assemblies together. We offer such a tool,
http://www.remotesoft.com/linker, which can link/merge
files together, it can also link framework DLLs into your
own assembly.

Since we don't have trial version yet, you can send your
files to (e-mail address removed), and the linked file will
be sent back to you for evaluation.

Huihong

-----Original Message-----
I've been trying to get a concrete answer to this for the last few
days, but have come up short. I'm hoping someone here can help.

Is there a way to take a set of c# modules (c# code compiled using csc
with the /t:module option) and combine them into a single assembly
using the assembly linker or any other tool.

For example I have the following compiled c# modules:
foo1.netmodule
foo2.netmodule

I'd like to link them into a single .net assembly named foolinked.dll.

I have tried

al foo1.netmodule
foo2.netmodule /target:library /out:foolinked.dll
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top