Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

how to know the Assembly/dll information of .net project .

 public Static class AssemblyInfo
        {

            public static string BuildName;
            public static string BuildVersion;
            public static string BuildDate;
            static GlobalInfo()
            {
                var assembly = Assembly.GetExecutingAssembly();
                //buildName = assembly.GetName().ToString();
                BuildName = "smw-service";//Hard coded intentionallly
                BuildVersion = assembly.GetName().Version.ToString();
                var path = Assembly.GetCallingAssembly().Location;
                if (!string.IsNullOrWhiteSpace(path))
                    BuildDate = File.GetLastWriteTime(path).ToString("MMM dd, yyyy");
            }
        }




This post first appeared on Dot Net Tutorial For Beginners With Examples, please read the originial post: here

Share the post

how to know the Assembly/dll information of .net project .

×

Subscribe to Dot Net Tutorial For Beginners With Examples

Get updates delivered right to your inbox!

Thank you for your subscription

×