using System.IO; using System.Reflection; public static class Version { public static string Get() { /*--- Inits ---*/ var assm = Assembly.GetExecutingAssembly(); var version = string.Empty; var resourceName = "ACME.Common.Version.txt"; /*--- Read Embedded Resource Content ---*/ using (var stream = assm.GetManifestResourceStream(resourceName)) { using (var reader = new StreamReader(stream)) { version = reader.ReadToEnd(); } } return version; } }