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'm trying:
@(Microsoft.Extensions.PlatformAbstractions.PlatformServices.Default.Application.ApplicationVersion)
This does not work, it displays "1.0.0
" instead of real value from project.json
I also tried this but it looks like it is no longer works in RC2:
@inject Microsoft.Extensions.PlatformAbstractions.IApplicationEnvironment appEnv
My version number is @(appEnv.ApplicationVersion)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…