Solved

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

Posted on 2009-04-08
2
6,055 Views
Last Modified: 2013-11-05
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.

0
Comment
Question by:plq
2 Comments
 
LVL 9

Accepted Solution

by:
Sreedhar Vengala earned 500 total points
ID: 24095158
Open your solution in visual studio, click build menu, and configuration manager
In active solution configuration drop down click  new and call it something like x64
Now in the grid change platform to X64 (by default its Any CPU)


Now save you project


and the command is something like


devenv /build "x64" "d:\alarm\alarm.sln"  /project "Alarm"  
 bold and underlined is the solution configuration name, hope you will figure out.




You can change active solution configuration  if you like but at least create a new one for x64 platform
0
 
LVL 8

Author Comment

by:plq
ID: 24098201
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"

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question