Discussion:
MSbuild question - how to tell items in .ggroupproj to compile release
(too old to reply)
Mark Vejvoda
2007-12-31 22:15:30 UTC
Permalink
I have thus far had an outstanding conversion of our companies BDS 2006
products over to bds 2007 (great job Codegear). Even got the ceeFIT
libraries and Devexpress libraries compiled and working great. Now I need
some MSBuild help (the documentation seems very sparse). I have a project
group .groupproj file containing numerous projects. Using the commandline
(automated build system) how do i tell MSBuild to build all those projects
in either debug or release mode? I am able to do this for individual
projects using

/t:Build /p:Configuration=Release
/t:Build /p:Configuration=Debug

But it does NOT seem to work for .groupproj files. I see the default active
project is used when called from a groupproj and don't know how to override
this behaviour? (Canadian spelling :))

Thanks
--
Mark Vejvoda
web: www.soft-haus.com
blog: www.soft-haus.com/blog
Mark Vejvoda
2008-01-01 15:49:23 UTC
Permalink
Ok I found the solution (and it also applies to individual project files).
The proper way to toggle debug and release (proper in that through my
experimentation it is the only mechanism that seems to work) is to use the
following commandlines:

msbuild.exe myprojgroup.groupproj /t:Clean;Build /p:"Config=Release Build"
msbuild.exe myprojgroup.groupproj /t:Clean;Build /p:"Config=Debug Build"

msbuild.exe myproj.cbpproj /t:Clean;Build /p:"Config=Release Build"
msbuild.exe myproj.cbproj /t:Clean;Build /p:"Config=Debug Build"

Thus far I have to say that RAD Studio 2007 is an excellent product. Finally
I have some hope to work in a stable C++ IDE. I was quite skeptical to
upgrade from BDS2006 as my experience from BCB6 -> 2006 was absolutely
hideous. Good job Codegear, you have started to earn back some trust from
me. I also think that switching to MSBuild is basically a dream come true
for any serious C++ customers out there that use Rad Studio. In our "Agile"
team we totally rely on automation and reliable builds. This was problematic
in BDS2006 with a very flaky build system.
Post by Mark Vejvoda
I have thus far had an outstanding conversion of our companies BDS 2006
products over to bds 2007 (great job Codegear). Even got the ceeFIT
libraries and Devexpress libraries compiled and working great. Now I need
some MSBuild help (the documentation seems very sparse). I have a project
group .groupproj file containing numerous projects. Using the commandline
(automated build system) how do i tell MSBuild to build all those projects
in either debug or release mode? I am able to do this for individual
projects using
/t:Build /p:Configuration=Release
/t:Build /p:Configuration=Debug
But it does NOT seem to work for .groupproj files. I see the default
active project is used when called from a groupproj and don't know how to
override this behaviour? (Canadian spelling :))
Thanks
--
Mark Vejvoda
web: www.soft-haus.com
blog: www.soft-haus.com/blog
Dennis Jones
2008-01-01 16:32:49 UTC
Permalink
Post by Mark Vejvoda
Thus far I have to say that RAD Studio 2007 is an excellent product.
Finally I have some hope to work in a stable C++ IDE. I was quite
skeptical to upgrade from BDS2006 as my experience from BCB6 -> 2006 was
absolutely hideous.
Agreed.
Post by Mark Vejvoda
Good job Codegear, you have started to earn back some trust from me. I
also think that switching to MSBuild is basically a dream come true for
any serious C++ customers out there that use Rad Studio. In our "Agile"
team we totally rely on automation and reliable builds. This was
problematic in BDS2006 with a very flaky build system.
Unfortunately, RAD Studio has its own build problems problems. Try to
specify the output path for certain file types and you will discover that
you either can't specify them (HPP), or they won't go where you want (BPI).
Build events can be used as a workaround, but it's a hack for a common bug
in every C++Builder product since day one. I wish they would concentrate
more effort in this area.

- Dennis
David Dean [CodeGear]
2008-01-02 18:58:58 UTC
Permalink
Post by Dennis Jones
Unfortunately, RAD Studio has its own build problems problems. Try to
specify the output path for certain file types and you will discover that
you either can't specify them (HPP), or they won't go where you want (BPI).
Build events can be used as a workaround, but it's a hack for a common bug
in every C++Builder product since day one. I wish they would concentrate
more effort in this area.
Are these in QC?
--
David Dean (CodeGear)
Lead C++ QA Engineer
Dennis Jones
2008-01-02 19:10:31 UTC
Permalink
Post by David Dean [CodeGear]
Post by Dennis Jones
Unfortunately, RAD Studio has its own build problems problems. Try to
specify the output path for certain file types and you will discover that
you either can't specify them (HPP), or they won't go where you want (BPI).
Build events can be used as a workaround, but it's a hack for a common bug
in every C++Builder product since day one. I wish they would concentrate
more effort in this area.
Are these in QC?
Yes.

- Dennis
Dennis Jones
2008-01-02 19:16:12 UTC
Permalink
Post by David Dean [CodeGear]
Post by Dennis Jones
Unfortunately, RAD Studio has its own build problems problems. Try to
specify the output path for certain file types and you will discover that
you either can't specify them (HPP), or they won't go where you want (BPI).
Build events can be used as a workaround, but it's a hack for a common bug
in every C++Builder product since day one. I wish they would concentrate
more effort in this area.
Are these in QC?
Yes.
Details:

Report No: 53120 Status: Reported
Output directory management
http://qc.codegear.com/wc/qcmain.aspx?d=53120
QCWIN:Defect_No=53120

Report No: 53119 Status: Open
BPI output files go to wrong directory
http://qc.codegear.com/wc/qcmain.aspx?d=53119
QCWIN:Defect_No=53119

- Dennis
David Dean [CodeGear]
2008-01-02 20:54:38 UTC
Permalink
Thanks, this helps me keep track of them and make sure they don't
fall off the radar when I get distracted with other things.
Post by Dennis Jones
Report No: 53120 Status: Reported
Output directory management
http://qc.codegear.com/wc/qcmain.aspx?d=53120
QCWIN:Defect_No=53120
I've promoted this one.
Post by Dennis Jones
Report No: 53119 Status: Open
BPI output files go to wrong directory
http://qc.codegear.com/wc/qcmain.aspx?d=53119
QCWIN:Defect_No=53119
This one was already being looked at by someone else on the team. 8-)
--
David Dean (CodeGear)
Lead C++ QA Engineer
David Dean [CodeGear]
2008-01-02 18:49:28 UTC
Permalink
Post by Mark Vejvoda
But it does NOT seem to work for .groupproj files. I see the default active
project is used when called from a groupproj and don't know how to override
this behaviour? (Canadian spelling :))
msbuild.exe ProjectGroup.groupproj /t:MakeAll (or BuildAll, or CleanAll)

should make/build/clean all configurations (Debug, Release, and any
custom ones you have created)

If you only want to do Release or some custom configuration that is not
set as the default, then the solution you posted appears to be the
correct answer.
--
David Dean (CodeGear)
Lead C++ QA Engineer
Loading...