如何在 Visual Studio 2010 中将项目输出平台设置为 x86
在我的几个项目的解决方案中,我尝试将 Platform
从 Any CPU 更改为 x86。但 x86 不在下拉列表中。我需要做什么才能选择 x86?
由于 System.BadImageFormatException
错误,我需要更改为 x86,根据以下问题:构造 System.Data.SQLite.SQLiteConnection 时导致 System.BadImageFormatException 的原因
并且,在可能相关的问题中,解决方案中的最新项目缺少配置下降中的配置之一down:
它应该像所有其他项目一样具有“暂存”配置,但事实并非如此。我该如何添加它?
编辑:
如果我选择“新建...”选项,那么它会要求我从“任何CPU”复制。如果我从“任何CPU”复制,那不是和首先使用“任何CPU”一样吗?
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 "Any CPU". If I copy from "Any CPU", isnt that just the same as using "Any CPU" in the first place?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
配置和平台下拉菜单都有一个:
选项。事实上,您在带注释的屏幕截图中将它们圈起来!
使用该选项为相应项目创建“Staging”配置和“x86”平台。
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.
您可以使用
/platform
编译器开关设置项目平台,如下所示,其中
string
可以是x86、Itanium、x64 或 anycpu(默认)
如果您想从 Visual Studio 实现相同的目标,则可以按照以下步骤操作
有关同一内容的详细信息,请参阅此处 。
You can set project platform using the
/platform
compiler switch like belowWhere the
string
can be either ofx86, Itanium, x64, or anycpu (default)
In case you want to achieve the same from Visual Studio then you can follow the below steps
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.