I’m trying to set up our build number and release notes on ASP.NET MVC with Razor–it seems like there is some functionality built in, because this is already in the main layout page in the header:
<a href="@ViewBag.VersionLink">Build: @ViewBag.VersionInfo</a>
We are on build 145 now, however, it always says Build: 1.0.0.0 and the link goes to App_Readme/Build1.0.0.0.txt which just spits this out:
Hi,
This is build 1.0.0.0
Thanks
I can not figure out where to update the build info. I’ve tried to backtrace it but it hasn’t lead anywhere, and google has not turned up much that is useful.
How can I configure the release notes or set up the build versioning? I’ll even accept an answer that points me to a good online resource that will help me out.
In short: There is no black magic that will know the applications build or release version in asp.net mvc. Thus, this information needs to be passed from your controller to the View.
You may use a strongly typed viewmodel or
TempDatato pass that information to the ASP.NET MVC view.Here you are some references to look – Intro to ASP.NET MVC 3 (C#).
Edit: If you would like to use
ViewBagthen this video-tutorial is very handy one to consider: – ViewBag: Introduction to MVC – Course