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
And, in a possibly related problem, the newest project in the solution is missing one of the configurations from the configuration drop down:
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开发者_如何学C "Any CPU". If I copy from "Any CPU", isnt that just the same as using "Any CPU" in the first place?
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.
You can set project platform using the /platform
compiler switch like below
/platform:string
Where the string
can be either of x86, Itanium, x64, or anycpu (default)
csc /platform:x86 myprogram.cs
In case you want to achieve the same from Visual Studio then you can follow the below steps
Open the Properties page for the project.
Click the Build property page.
3.Modify the Platform target property.
See Here For more information on the same.
I removed a solution platform and created it again with Create new project platforms check-box. It helped.
精彩评论