Visual Studio 2008 项目属性生成配置缺少选项 [英] Visual Studio 2008 Project Properties Build Configuration Missing Options

查看:36
本文介绍了Visual Studio 2008 项目属性生成配置缺少选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,希望有人能帮助我.

I have a strange problem, and hopefully someone can help me.

我有一个包含 13 个独立 C# 项目的解决方案.我正在使用 Vista x64 进行开发,我想构建这些项目以针对 x86 平台.这通常很容易.我可以转到解决方案属性 -> 配置属性并将平台更改为 x86.这里奇怪的部分是我的 3 个项目拒绝让我选择 x86.

I have a solution with 13 separate C# projects. I am using Vista x64 to develop on, and I would like to build these projects to target the x86 platform. This is normally quite easy. I can go to solution properties -> Configuration properties and change the platform to x86. The strange part here is that 3 of my projects refuse to allow me to select x86.

所以,我想我会分别访问这 3 个项目中的每一个,并在项目属性->构建和更改平台中更改它.这些项目没有配置和平台下拉菜单.我搜索了一下,在工具->选项->项目和解决方案->显示高级构建配置中找到了一个设置.选择此项后,当转到违规项目的项目属性时,我现在可以看到两个下拉列表,但平台只允许我选择活动(任何 CPU).

So, I thought I'd go to each of these 3 projects separately and change it in Project Properties->Build and change the Platform. And the Configuration and Platform dropdowns are not there for these projects. I googled around a bit, and found a setting in Tools->Options->Projects And Solutions->Show Advanced build configuration. After selecting this, when going to Project Properties for the offending projects, I now see both dropdowns, but the platform only lets me select Active (Any CPU).

我也无法将这些项目的解决方案属性中的平台更改为 x86.

I can also not change the Platform in Solution properties to x86 for these projects.

有什么想法吗?

推荐答案

听起来像是构建配置变得古怪.这三个项目可能是在解决方案配置为支持x86之后添加的(新项目仅支持AnyCPU,即使解决方案支持更多平台.)

Sounds like the Build Configurations have gone screwy. The three projects were probably added after the solution was configured to have x86 support (New projects only support AnyCPU, even if the solution supports more platforms.)

  • 转到构建->配置管理器...
  • 将Active Solution Platform"更改为 x86(如果存在.如果只有 AnyCPU,则使用它.)
  • 对于每个违规项目,在平台列中,选择新建"
  • 选择新平台为x86",从任何 CPU"复制设置,并确保未选中该复选框.
  • 点击确定.

使解决方案和单个项目之间的配置/平台保持一致可能很棘手.配置管理器的行为可能会出乎意料 - 特别是对于自定义解决方案配置.我建议先玩一个测试解决方案.

Getting configuration/platforms consistent between the solution and individual projects can be tricky. The Configuration Manager can behave unexpectedly - especially with custom solution configurations. I suggest playing in a test solution first.

这篇关于Visual Studio 2008 项目属性生成配置缺少选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆