In an ASP.NET Core ( ASP 5, ASP vNext):
How can I read the version and other meta data in the project.json in my Razor views?
My project.json file is something like this:
{
"version" : "1.0.0-*",
"authors" : ["author 1", "author 2"],
"description" : "my project description"
// ...
}
You could use the options model. I have created a sample to read the version number out to the layout page next to the footer here and you can read about configuration here. Lastly, there is a great project for live.asp.net created by Damian Edwards of the ASP.NET team here. I hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With