Created
June 8, 2014 19:42
-
-
Save ctaggart/199626590034267c79ef to your computer and use it in GitHub Desktop.
print the assembly version attributes for each dll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
open System.Reflection | |
Directory.GetFiles(".","*.dll",SearchOption.TopDirectoryOnly) |> Seq.iter (fun f -> | |
printfn "%s" f | |
let a = Assembly.LoadFrom f | |
match a.GetCustomAttribute<AssemblyVersionAttribute>() with | |
| null -> () | |
| v -> printfn " Version: %s" v.Version | |
match a.GetCustomAttribute<AssemblyFileVersionAttribute>() with | |
| null -> () | |
| fv -> printfn " FileVersion: %s" fv.Version | |
match a.GetCustomAttribute<AssemblyInformationalVersionAttribute>() with | |
| null -> () | |
| iv -> printfn " InformationalVersion: %s" iv.InformationalVersion | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment