Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a project output platform to x86 in Visual Studio 2010

Tags:

In my solution with several projects I am trying to change the Platform from Any CPU to x86. But x86 is not in the drop down. What do I need to do to be able to choose x86?

I need to change to x86 because of an System.BadImageFormatException error, as per this question: What causes System.BadImageFormatException when constructing System.Data.SQLite.SQLiteConnection

enter image description here

And, in a possibly related problem, the newest project in the solution is missing one of the configurations from the configuration drop down:

enter image description here

It should have a "Staging" configuration like all of the other projects, but does not. How do I add it?

EDIT:

If I choose the "New ..." option, then it asks me to copy from "Any CPU". If I copy from "Any CPU", isnt that just the same as using "Any CPU" in the first place?

enter image description here

like image 300
JK. Avatar asked Jun 18 '11 22:06

JK.


People also ask

How do I add x86 to Visual Studio?

Click BUILD > CONFIGURATION MANAGER select the platform dropdown to X86 and click CLOSE. If you don't have x86 as an available option in the drop down list, select "<New...>", then for "Type or select the new platform" to choose "x86" and "Copy settings from" as "<Empty>".

How do you change the active solution platform from any CPU to x86?

In the Configuration Manager dialog, open the Active solution platform drop-down list box and click <New> …. In the New Solution Platform dialog, select x64 in the Type or select the new platform drop-down list box. Select x86 in the Copy settings from drop-down list box. Click OK.

How do I change the output path in Visual Studio?

Right-click on the project node in Solution Explorer and select Properties. Expand the Build section, and select the Output subsection. Find the Base output path for C#, and type in the path to generate output to (absolute or relative to the root project directory), or choose Browse to browse to that folder instead.


1 Answers

Both the Configuration and Platform drop downs have a:

  • <New...>

option. In fact you have them circled in your annotated screenshots!

Use that option to create the "Staging" configuration and the "x86" platform for the corresponding project.

like image 61
Rick Sladkey Avatar answered Sep 25 '22 08:09

Rick Sladkey