2 // mono-find-provides.cs - Prints out an assembly's name and version
4 // Author: Duncan Mak (duncan@ximian.com)
6 // 2004 Copyright Novell Inc.
10 using System
.Reflection
;
15 static void Main (string [] args
)
17 if (args
.Length
== 0) {
18 string s
= Console
.ReadLine ();
22 s
= Console
.ReadLine ();
26 foreach (string s
in args
)
31 static void PrintProvides (string s
)
34 Assembly a
= Assembly
.LoadFrom (s
);
35 AssemblyName an
= a
.GetName ();
37 // hack to work around the issue with a 2.0 corlib
38 if (s
.Trim ().EndsWith ("2.0/mscorlib.dll"))
39 Console
.WriteLine ("mono({0}) = {1}", "mscorlib", "2.0.3600.0");
41 Console
.WriteLine ("mono({0}) = {1}", an
.Name
, an
.Version
);