Link to home
Start Free TrialLog in
Avatar of plq
plqFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How to force 64 bit and 32 bit builds via devenv command line

vs2005 / .net 2.0

I'm trying to force devenv to build a sln file containing vdproj files for a particular architecture via the command line

e.g.   devenv myproj.sln /rebuild "Release|x64"

But it just goes ahead and builds for "any cpu"

How can I force it to build for a specific architecture ? I am setting the TargetPlatform attribute in the vdproj but that doesnt seem to do it.

ASKER CERTIFIED SOLUTION
Avatar of Sreedhar Vengala
Sreedhar Vengala
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of plq

ASKER

This helped push me in the right direction.

I eventually found that the solution configurations are driving which build of each project, so I had to check every project / build / platform combination to ensure everything was consistent.

So now I am not having a separate solution config as you sugested, but instead I am using the platform dropdown and using /build "Release|x64" syntax within the devenv command

So the key points are:

1. Ensure every project > advance compile options is targeting  AnyCPU for every platform and every solution configuration
2. Ensure server combination of platform and configuration is correctly set for each project in the solution configuration manager
3. Build with /build "Release|x64"