Getting Publish Details within MVC Razor View

122 views Asked by At

I'm working on an MVC site with a team and I'd like to display the last publish timestamp and the name of the user that last publsihed within a comment inside of the _Layout.cshtml page while we're in development. I'm open to packages or msbuild tasks to achieve this, but I'm not positive on the best direction. Right now, I'm able to display a last build time in this fashion:

<!--
Last Built on: @File.GetCreationTime(ViewContext.Controller.GetType().Assembly.Location)
Last Built by: //desired output similar to: jsmith
-->

The file ownership of the assembly shows the IISAppPool account.

0

There are 0 answers