Solved

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

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

746 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now