Configuration With Same Name Already Exists

2019-01-30 16:44发布

I have a solution with 10+ projects (VS2010 SP1). I have the following configurations defined in the solution:

  • Debug
  • Debug-QA
  • Release-UAT
  • Release-Production

This allows me to easily setup specific settings for each deployment scenario. However, for some reason I can't get things setup as I'd like. Please see this screenshot:

Screenshot of Configuration Manager

Notice the highlighted projects/configurations. I am unable to create a "Debug-QA" configuration for these projects (by selecting <New> in the cell for that particular project). When I try to add a new "Debug-QA" configuration to the DataUtility project, for instance, Visual Studio yells at me:

This configuration could not be created because a solution configuration of the same name already exists.

I know it does! I'm trying to add the configuration to the project! What am I missing here? I want all projects to have all 5 configuration. I have the same problem when trying to match up (create) platforms (for instance, adding an "Any CPU" platform to the DataUtility project).

2条回答
放荡不羁爱自由
2楼-- · 2019-01-30 17:25

Make sure you're using the drop down list from the grid (not the one at the top of the dialog), and do not check the "Create new solution configurations" checkbox when adding your new project configuration.

查看更多
倾城 Initia
3楼-- · 2019-01-30 17:42

Here's a workaround if already checked the Create new solution configurations checkbox:

  1. Open Explorer and navigate to the location of the solution for the project that is missing platforms.
  2. Move the solution .sln file to a temorary location where Visual Studio won't locate it.
  3. Open the .csproj file for the project that is missing platforms.
  4. Click the Solutions Platform dropdown.
  5. Click Configuration Manager...
  6. In the table, Click the dropdown in the Platform column for the project and select , to add a new platform.
  7. Click OK.
  8. Repeat adding new platforms as needed.
  9. Save the project.
  10. Return the previously moved solution file back to where it was.
  11. Reopen the combined project solution.

source: https://developercommunity.visualstudio.com/content/problem/972/adding-a-platform-when-one-with-the-same-name-alre.html

查看更多
登录 后发表回答