Home »

How can I produce an assembly?

Question ListCategory: .NETHow can I produce an assembly?
shah_kajal184 author asked 1 year ago
1 Answers
denielshakespeare5 author answered 10 months ago

The simplest way to produce an assembly is directly from a .NET compiler.For example, the following C# program:
public class CTest
{
public CTest() { System.Console.WriteLine( “Hello from CTest” ); }
}

can be compiled into a library assembly (dll) like this:
csc /t:library ctest.cs

You can then view the contents of the assembly by running the “IL Disassembler” tool that comes with the .NET SDK.

Alternatively you can compile your source into modules, and then combine the modules into an assembly using the assembly linker (al.exe). For the C# compiler, the /target:module switch is used to generate a module instead of an assembly.

Please login or Register to Submit Answer