By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,193 Members | 1,691 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,193 IT Pros & Developers. It's quick & easy.

Combining modules with the Assembly Linker

P: n/a
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.
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

--
Rob Windsor [MVP-VB]
G6 Consulting
Toronto, Canada
"Mike Nau" <mi******@yahoo.com> wrote in message
news:b8**************************@posting.google.c om...
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.

Jul 21 '05 #2

P: n/a
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 se*****@remotesoft.com, 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 fewdays, 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 cscwith the /t:module option) and combine them into a single assemblyusing 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 onlycontains the assembly manifest and points to foo1.netmodule andfoo2.netmodule.

Any help would be greatly appreciated.

Thanks,
Mike.
.

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.