0

I want to programatically retrieve File Version information from Assembly Information window in C# code. So that I can do my further work based on that info. I have given a picture which info I want to retrieve

enter image description here

So any one have idea how do I retrieve this info???

Community
  • 1
  • 1
Rahul More
  • 615
  • 3
  • 13
  • 41

2 Answers2

0

You can use:

FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location).FileVersion;
Shai Aharoni
  • 1,955
  • 13
  • 25
-1

Try this snippet:

Assembly assem = Assembly.LoadFrom(YourFilePath);
Console.WriteLine("Assembly Full Name:");
Console.WriteLine(assem.FullName);
AssemblyName assemName = assem.GetName();
Console.WriteLine("Version: {0}.{1}", assemName.Version.Major, assemName.Version.Minor);
semao
  • 1,757
  • 12
  • 12