English 中文(简体)
防止Visual Studio自动创建“混合平台”解决方案配置。
原标题:
  • 时间:2008-10-16 06:07:35
  •  标签:

我该如何防止Visual Studio 2008自动创建“混合平台”和“任意CPU”解决方案配置?我们有“Win32”和“x64”配置,开发人员需要在它们之间进行选择。但是,只要有人对解决方案进行任何更改,VS就会自动创建“混合平台”,它似乎是默认的配置。这会导致很多问题,因为事实证明,某些新项目没有在此配置中选定,或者选择了错误的项目配置等。我只想阻止它这样做,并自己管理解决方案配置。

问题回答

我们遇到一个类似的问题,即我们想为Win32配置和多个不同的智能设备平台/配置组合构建Visual Studio 2005项目。

在任意时间,每个平台都会自动生成每个配置文件,无论其是否有效,这会导致我们约50个项目文件的大小爆炸,并导致大量工作来解决此问题。

当我们打开配置管理器对话框时,它总是会发生;而在更改配置的项目设置时,它有时会发生(但并非总是)。在后一种情况下,似乎与在项目设置对话框上操作平台和配置下拉菜单有关。

我们将其作为Visual Studio问题提交了;微软将其关闭为“不会修复”。

我一直在处理同样的问题。我同意这是一团糟。我看到了两个可行的方法来处理它 - 两个都不是你真正想要的。

  1. Manually remove the configurations that it creates by going to the configuration chooser and picking edit...
  2. By default (at least if I start with a fresh solution in VS 2010) and start creating new projects (both class libraries and apps), you end up with Any CPU, Mixed Platforms, and x86 for your Solution Platforms. Visual Studio seems to do a good job adding new class libraries to both Any CPU and Mixed Platforms (since they default build for the Any CPU target) and adding new apps to both Mixed Platforms and x86 (since the default build for the x86 target), and putting both new class libraries and new apps to Mixed Platforms. So Mixed Platforms ends up being a nice default since it builds everything. I m not sure why it s not adding new projects for you to Mixed Platforms

您可以在源代码控制的提交钩子中筛选您的.sln文件。这样,如果您检查.sln文件并且可能修复项目文件,则开源的Chromium项目已经实现了这样的过滤器。





相关问题
热门标签