diff options
author | jfrijters <jfrijters> | 2004-12-02 11:43:05 +0300 |
---|---|---|
committer | jfrijters <jfrijters> | 2004-12-02 11:43:05 +0300 |
commit | b8229f78cc743367867392a523d8b3a856a2fc27 (patch) | |
tree | 7d16eac06578fdd207b5ee08d8f2817142f6f487 /tools | |
parent | ef5c340d43cefb6cd46888c6ddbbcc4772e400cf (diff) |
*** empty log message ***
Diffstat (limited to 'tools')
-rw-r--r-- | tools/asmref.cs | 38 | ||||
-rw-r--r-- | tools/tools.build | 10 |
2 files changed, 48 insertions, 0 deletions
diff --git a/tools/asmref.cs b/tools/asmref.cs new file mode 100644 index 00000000..909e6f4d --- /dev/null +++ b/tools/asmref.cs @@ -0,0 +1,38 @@ +using System; +using System.IO; +using System.Reflection; +using System.Text; + +class asmref +{ + static void Main(string[] args) + { + foreach(string s in args) + { + AssemblyName asm; + if(File.Exists(s)) + { + asm = Assembly.LoadFile(new FileInfo(s).FullName).GetName(); + } + else + { + asm = Assembly.LoadWithPartialName(s).GetName(); + } + + Console.WriteLine(".assembly extern {0}", asm.Name); + Console.WriteLine("{"); + if(asm.GetPublicKeyToken() != null) + { + StringBuilder sb = new StringBuilder(); + foreach(byte b in asm.GetPublicKeyToken()) + { + sb.AppendFormat("{0:X2} ", b); + } + Console.WriteLine(" .publickeytoken = ({0})", sb.ToString()); + } + Version v = asm.Version; + Console.WriteLine(" .ver {0}:{1}:{2}:{3}", v.Major, v.Minor, v.Build, v.Revision); + Console.WriteLine("}"); + } + } +} diff --git a/tools/tools.build b/tools/tools.build new file mode 100644 index 00000000..145617b7 --- /dev/null +++ b/tools/tools.build @@ -0,0 +1,10 @@ +<?xml version="1.0"?> +<project name="tools" default="tools"> + <target name="tools"> + <csc target="exe" output="asmref.exe" optimize="true"> + <sources> + <includes name="asmref.cs" /> + </sources> + </csc> + </target> +</project> |