Below code would help you get the Assembly version.
This code also stamp the build version in a file where you want to write the build version.
The build version is nothing but versioning provided after building the Project from tfs.
so here the code:
///
/// This method will get the version
///
///return version of version as string
private static string GetVersion()
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
return fileVersionInfo.ProductVersion;
}
Thanks,
Md. jawed
This code also stamp the build version in a file where you want to write the build version.
The build version is nothing but versioning provided after building the Project from tfs.
so here the code:
///
/// This method will get the version
///
///
private static string GetVersion()
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
return fileVersionInfo.ProductVersion;
}
Thanks,
Md. jawed
No comments:
Post a Comment