Question Custom Build Events?

JoeFX

Member
Joined
Mar 18, 2009
Messages
6
Programming Experience
3-5
I'm looking for ways of adding some "custom post-build" code to a Visual Basic project, mainly for creating some reports with details of file versions etc whenever a new build is created.

I've had a look around and found this article on Build Events...

How to: Specify Build Events (Visual Basic)

It talks about using the "Build Events" button on the Compile tab of the Project Properties, however I don't seem to have the "Build Events" buttons as seen here...

customizingBuilds2.gif


I'm using the Express Edition - does anyone know if this is a limitation on this version?

If it is a limitation, does anyone know an easy way to create some basic code that will fire after a build is completed?

... or if the Build Events button is part of the Express edition, how do I get it to display?

:confused:

Thanks.
 
You can still do a commandline build and a post-build call from a single tool click, just write a batch file and pass the necessary paramters. An example of such a batch could be this (save somewhere as build.bat):
@Echo off
echo %1
C:\Windows\Microsoft.NET\Framework\v3.5\msbuild %1
notepad %1
Then setup the tool;
  • give it a title
  • command for example d:\build.bat
  • arguments $(SolutionDir)$(SolutionFileName) (you can get these from the field selector button)
  • check 'use Output window'
Starting this tool you should see the first argument expanded and build messages in VS Output window then the solution file open in Notepad.
 
Back
Top