I'm trying to put a build stamp on the bottom of my application with details like the build date, framework version and also the Visual Studio version (i.e., the version of Visual Studio used to build the app).
Previously this was hard coded but now that we are migrating, making this programmatic is a good opportunity. I have managed to do the former two attributes like so:
Dim targetFrameworkAttribute As TargetFrameworkAttribute =
Assembly.GetExecutingAssembly().GetCustomAttributes(GetType(TargetFrameworkAttribute), False).SingleOrDefault()
lblBuildDate.Text = $"Build date: {mdBuildDate} - [ VS2017 ] [ {targetFrameworkAttribute.FrameworkDisplayName.Replace(" Framework", "")} ]"
(mdBuildDate is collected from the database as a string)
But I am struggling to find a way of collecting the Visual Studio version from the assembly or elsewhere.
Does anyone know if this is possible?