Solved

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

Posted on 2009-04-08
2
5,988 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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