top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to Get the File Version of the Assembly in .NET (C#)?

0 votes
329 views
How to Get the File Version of the Assembly in .NET (C#)?
posted May 17, 2016 by Sathyasree

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes
using System;

using System.Collections;

using System.Collections.Generic;

using System.Data;

using System.DirectoryServices.AccountManagement;

using System.IO;

using System.Linq;

using System.Net;

using System.Net.Sockets;

using System.Reflection;

namespace AbundantCode

{

internal class Program

{

// How to Get the File Version of the Assembly in .NET (C#)?

private static void Main(string[] args)

{

System.Reflection.Assembly CurrentAssembly = Assembly.GetExecutingAssembly();

System.Diagnostics.FileVersionInfo fileVersionInfo = System.Diagnostics.FileVersionInfo.GetVersionInfo(CurrentAssembly.Location);

Console.WriteLine(fileVersionInfo.FileVersion);

Console.ReadKey();

}

}

}
answer May 17, 2016 by Shivaranjini
...