Reputation: 2185
It's not anything critical, but when working on projects all day long, we know when code changes happen, but there's currently no way of knowing when the last publish happened. Is there some kind of way to modify the build file to dump a time stamp to the output window when building? https://i.sstatic.net/ZHM2i.png
i've tried this in the csproj file
<PostBuildEvent>
<Command>ECHO ============ %TIME% ============</Command>
<Message>build time</Message>
</PostBuildEvent>
and i've tried time /t for the command.
Upvotes: 1
Views: 1281
Reputation: 2185
The solution was thanks to all commenters but nobody posted an answer so here you go.
In your solution properties > build events (yes it's on a per-solution basis, unfortunately), add this line:
ECHO ######%TIME%######
this will place the build time in the build output. However, in my case this wasn't good enough since it got lost in all the file copying that happened afterwards since it's a web project. My ideal solution was a popup. Final solution:
file: msgbox.vbs in your c:\ directory:
Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText, , "Last Publish Time"
and then in your solution properties build events (set to always),
taskkill /fi "WINDOWTITLE eq Last Publish Time"
START c:\msgbox.vbs %TIME%
What this does is launch msgbox.vbs asynchronously (START) with the time, but since i want this automatic i first call taskkill to close the previous display. Now whenever i want to view my last publish time, i merely have to mouse over the WSH icon.
Upvotes: 1