How do I display application version from the project.json?
I am using gulp-bump to autoincrement version, but I can\'t show the recent version. Here is what I\
I used a different approach, as stated in this answer which gave me a SemVer version (1.0.0) which is actually in my project.json and not 1.0.0.0, which is returned by accepted answer. So the code would be:
var runtimeVersion = typeof(Startup)
.GetTypeInfo()
.Assembly
.GetCustomAttribute()
.InformationalVersion;
It returns correct suffixed versions as well, i.e. something like "2.0.1-dev01"