what is the ".netmodule"

  • Thread starter Thread starter TJS
  • Start date Start date
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
 
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?
 
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.
 
Back
Top