Top Ad unit 728 × 90

random

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");
            }
        }


how to know the Assembly/dll information of .net project . Reviewed by Vikas Kumar Singh on December 03, 2017 Rating: 5

No comments:

All Rights Reserved by DotNetBasic.com © 2019

Contact Form

Name

Email *

Message *

© 2018 All rights reserved by DotNetBasic. Powered by Blogger.