PDA

View Full Version : Build Microsoft .NET action and the /rebuild flag


gribble
02-10-2004, 12:55 AM
when im building VisualStudio6 projects, i am using a macro in the "additional properties" steps to specify whether i want a full build or incremental. It is a string that is blank for incremental, and is set to "/rebuild" if i want to force a rebuild. (I have the checkbox for force rebuild turned off).


Now when it comes to building VS.NET projects, the problem is i cannot programmatically control the build/rebuild flag with a macro. This is because the commandline to build a .NET project generates the /build "DEBUG|RELEASE|whatever" command as part of the generated command... and tagging a "/rebuild" on the end in the additional parameters section causes the compiler to coimplain... (because the resulting command would be /build "DEBUG" /rebuild"

the reason why it works in VC++ is because the commandline is "/MAKE "DEBUG|RELEASE|whatever" so it doesnt complain if you tack a /rebuild flag on the end


I need to be able to control whether it builds or rebuilds with macros, so the checkbox for "Force Rebuild" isnt of help to me here. I realise there is a workaround,in that i could have two steps, one to build with the force checkbox and the other without... but im hoping in the next release there could be allowances made for this checkbox to be controlled by a macro so such a workaround isnt necessary...


comments?

kevina
02-10-2004, 09:42 AM
If I understand you correctly, you want to assign a macro value to a checkbox (specifically the force rebuild checkbox of the Make VS.NET action).

You can do this (I would recommend using a macro that contains a "1" or "0" to clearly indicate a 'boolean' value). This is called a 'field override' and is described in detail in the help file (under that topic).

To do this, select the checkbox you want to assign a macro value to, then click on the 'Insert Macro' button and select your macro (or you can just type it in).

Please read the topic 'field override' in the help file for details about assigning and removing a field override.

Sincerely,

Kevin

gribble
02-10-2004, 05:16 PM
Thanks for the help, it works a treat!

The more I find out about VBPro, the more I love it :D