Solved

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

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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visual Studio .Net 2012 and Crystal Reports 9 48
vb.net checkbox 7 41
Exit the loop 4 37
What do you call this line of code in this .NET Core page? 4 27
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 …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 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

14 Experts available now in Live!

Get 1:1 Help Now