Can we bind three assembly to one executable file.

U

Umut Tezduyar

My solution contains three assembly and one executable application file.
Before i distribute my solution, i want to bind 4 project to one executable
file. Is there a way for this.

Explanation:

Assembly1.dll
Assembly2.dll
Assembly3.dll
WindowsApplication.exe
 
C

Chris Taylor

Hi,

If you compiled the into modules, you could then use al.exe (assembly
linker) to combine the modules into a single assembly.
VS.NET does not support building modules, so you will have to do it a the
commandline. The following example uses the C# compiler to build two
modules.

csc /out:module1.mod /t:module module1.cs
csc /out:module2.mod /t:module module2.cs

Then using al.exe you can combine the modules into a single assembly

al /out:mytools.dll /t:lib module1.mod module2.mod

The modules do not need to all be the same language, you can combine VB.NET
modules and C# modules into a single assembly.

I hope this helps

Chris Taylor
 
U

Umut Tezduyar

I want to explain what i tried.

I made a cs file names Class1.cs. Its namespace is Namespace1. I compiled it
to namespace1.mod.
I made a cs file names Class2.cs. Its namespace is Namespace2. I compiled it
to namespace2.mod.

Then using Al.exe i linked them to a Assemblies.dll. I opened a new project
and add reference to the Assebmlies.dll. Its methadata doesnt appeared in
the intellisense. Do you have any idea about this.

Except this issue, the information you have given is wonderfull for me,
thanks a lot!!

Chris Taylor said:
Hi,

If you compiled the into modules, you could then use al.exe (assembly
linker) to combine the modules into a single assembly.
VS.NET does not support building modules, so you will have to do it a the
commandline. The following example uses the C# compiler to build two
modules.

csc /out:module1.mod /t:module module1.cs
csc /out:module2.mod /t:module module2.cs

Then using al.exe you can combine the modules into a single assembly

al /out:mytools.dll /t:lib module1.mod module2.mod

The modules do not need to all be the same language, you can combine VB.NET
modules and C# modules into a single assembly.

I hope this helps

Chris Taylor
 
C

Chris Taylor

Hi,

This is a known issue with VS. Only the types in the manifest DLL will be
shown in the intellisense.
One thing you could do which would slightly improve the situation is compile
one of the modules src as the
manifest DLL.

csc /out:module1.mod /t:module module1.cs
csc /out:Assemblies.dll /t:library module2.cs /addmodule:module1.mod

Now the types in module2 should be visible to the intellisense, but I have
not tested this!
Note that doing it like this you do not need to use AL.EXE.

Regards

Chris Taylor

Umut Tezduyar said:
I want to explain what i tried.

I made a cs file names Class1.cs. Its namespace is Namespace1. I compiled it
to namespace1.mod.
I made a cs file names Class2.cs. Its namespace is Namespace2. I compiled it
to namespace2.mod.

Then using Al.exe i linked them to a Assemblies.dll. I opened a new project
and add reference to the Assebmlies.dll. Its methadata doesnt appeared in
the intellisense. Do you have any idea about this.

Except this issue, the information you have given is wonderfull for me,
thanks a lot!!
 
U

Umut Tezduyar

As you told, the second class is in the intellisense. There were no errors,
when i tried to use the first one (In the module).
This conversation is completely perfect for me, thanks a lot.
 

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