Customize Build Process

M

Matt Fielder

I need to customize the build process beyond just selecting which projects
get built in what order.

What I want to happen is when I select "Release"
1: Pop a dialog confirming I want to build (release build takes several
minutes, and I regularly forget to switch back to "debug")
2: Build several projects in a specific order.
3: Run a batch file that checks everything out from VSS (can write the batch
file, just need to call it here)
4: Run another batch file that performs a linking operation from a utility
external to VS. (already have this batch file - again, just need to call it)
5: Run a batch file to check everything back into the safe (again, just
run - will write file)
6: Build the final project (which is an installshield setup project)

All of the searching I've done around "custom actions" seems to be related
to actions within a VS setup project.

Thanks in advance.
 
D

Dave Sexton

Hi Matt,

Check out the MSBuild utility:

MSBuild on MSDN:
http://msdn2.microsoft.com/en-us/library/wea2sca5.aspx

That should help to automate some of the build process.

You can write a batch file that kicks off your custom build script. Add the batch file as a custom tool in the VS.NET IDE so that
it appears in the Tools menu.
What I want to happen is when I select "Release"
1: Pop a dialog confirming I want to build (release build takes several minutes, and I regularly forget to switch back to "debug")

AFAIK you'd have to write a custom VS.NET add-in to do this. I think there is an event for when the solution is about to be built,
but I'm not sure if you can cancel it.

I'm not sure if there is an event raised when the configuration changes by selecting "Release", but if there is I think you can then
start the solution build through automation if you handle that event. (You could run your msbuild script at this point instead)
2: Build several projects in a specific order.

Right-mouse click Solution node in Solution Explorer and select "Project Build Order..."
3: Run a batch file that checks everything out from VSS (can write the batch file, just need to call it here)
4: Run another batch file that performs a linking operation from a utility external to VS. (already have this batch file - again,
just need to call it)
5: Run a batch file to check everything back into the safe (again, just run - will write file)

In the property pages for the project that you have set to build last you can add a Post-build event that executes your batch
scripts.
6: Build the final project (which is an installshield setup project)

Maybe you can do that in another batch script, immediately after the ones you stated previously.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top