PDA

View Full Version : VBP generates an EXE of different size and crashes than VS2005


jlk4sv
05-15-2009, 01:50 PM
So I have this horrible conundrum that has only occurred recently among many VBP projects we do at my company.

When I build my C++ app in VS2005 (+SP1) I get an app that is 3,844K and works fine, but when I build it using VBP (via MSBUILD/VCBUILD, I guess), I get an EXE that is 3,848K and crashes consistently in a specific spot when running the app.

This only appears to happen with the Release build. From looking at the solution settings in VS2005, most of them are default, and I've tried various switches that seem unique to the solution, but they either prevent building or don't make any apparent difference.

I'm running under Windows 2003 Server.

Is this familiar to anyone or any ideas what the problem might be.


- James (from Sportvision.com)

kinook
05-15-2009, 02:18 PM
It is Visual Studio (msbuild/vcbuild/devenv) that actually performs the building of a VS solution or project, not VBP itself. Building a VS project from the command-line is not identical to building in the VS IDE. If building via MSBuild does not work, you might try using devenv (enter devenv in the Override field on the Advanced tab), as this will be closer to what the IDE does when building. You can check the 'Display the compiler command-line' checkbox on the Advanced tab and rebuild the step, to determine the command-line being used and reproduce outside VBP (and provide to MS when submitting a support incident).

jlk4sv
05-15-2009, 04:01 PM
Originally posted by kinook
It is Visual Studio (msbuild/vcbuild/devenv) that actually performs the building of a VS solution or project, not VBP itself. Building a VS project from the command-line is not identical to building in the VS IDE. If building via MSBuild does not work, you might try using devenv (enter devenv in the Override field on the Advanced tab), as this will be closer to what the IDE does when building. You can check the 'Display the compiler command-line' checkbox on the Advanced tab and rebuild the step, to determine the command-line being used and reproduce outside VBP (and provide to MS when submitting a support incident).

I know the command-line build is different from building in the IDE, but knowing that doesn't help me figure out what is wrong or different. I foolishly forgot to mention I'm using VBP 6.6 and not the latest, so that may be part of the problem. There is no Advanced tab in 6.6 for the 'Make VS 2005' build step and no 'Display the compiler command-line' checkbox that I can find either. There is an override field, so I will try that.

Thanks the reply is still helpful and gives me a direction to follow to figure out what the problem is. Hopefully I'll find out what to do to avoid it in the future. This is the first time this has been an issue, but it is perplexing.

jlk4sv
05-15-2009, 06:41 PM
Yay! Using 'devenv' in the override field fixed my problem.

I'm glad because I dreaded digging through the command line.

Thanks again.