what is the ".netmodule"

T

TJS

in this command line to create a strong name, what is the ".netmodule", and
how do I create/get one ?


al /out:MyAssembly.dll MyModule.netmodule /keyfile:sgKey.snk
 
S

Scott Allen

A .netmodule is a "raw" module. I don't believe Visual Studio will let
you create a raw module but you could create one with command line
tools (csc with the /t:module option).

A raw module can't be deployed by itself, it has to be associated with
an assembly, which is what the assembly linker (al.exe) does. I get
the feeling you might not need to use al.exe, do you just need to
strong name an assembly? Are you using VS.NET?
 
S

Scott Allen

Hi TJS:

You could let the compiler string name the assembly by putting an
attribute into a source code file:

[assembly:AssemblyKeyFileAttribute(@"<key file name>")]

If you don't want to do this at compile time, you can delay sign:

[assembly:AssemblyKeyFileAttribute(@"<key file name>")]
[assembly:AssemblyDelaySignAttribute(true)]

The compiler still needs the key file name to at least insert the
public key into the assembly. Later you can do the actualy strong name
signing using sn.exe with the -R switch.
 

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

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top