简体   繁体   English

Visual Studio 2017自定义配置

[英]visual studio 2017 custom configurations

I have a solution with several custom configurations (staging, QA, etc) 我有一个具有几个自定义配置(阶段,QA等)的解决方案

Ive added a new project (azure webjob) but the newly added project cant see the custom configurations only the standard Debug & Release. Ive添加了一个新项目(azure webjob),但是新添加的项目仅标准的Debug&Release无法看到自定义配置。

In the configuration manager the only options I have alongside my new project are debug & release its not seeing the other custom configs. 在配置管理器中,我在新项目旁边只有的选项是debug&release,它看不到其他自定义配置。

Is there a workaround for this ? 是否有解决方法?

Each project and solution has its own list of configurations. 每个项目和解决方案都有其自己的配置列表。 The Configuration Manager defines which project configurations will be used for a given solution configuration. 配置管理器定义将用于给定解决方案配置的项目配置。 So if you add a new project to a solution that already has custom configurations, the project will still only have the default configurations for its type (Debug and Release in this case). 因此,如果将新项目添加到已经具有自定义配置的解决方案中,则该项目仍将仅具有其类型的默认配置(在这种情况下为“调试”和“发布”)。

To create new project configurations and associate them with solution configurations of the same name: 要创建新的项目配置并将它们与同名的解决方案配置相关联:

  1. Right-click your solution in Solution Explorer and open the Configuration Manager. 在解决方案资源管理器中右键单击您的解决方案,然后打开配置管理器。
  2. Select your custom solution configuration in Active solution configuration . 在“ 活动解决方案配置”中选择您的自定义解决方案配置
  3. In the Project contexts list, find your newly-created project. 项目上下文列表中,找到您新创建的项目。
  4. Expand the Configuration drop down and select New... . 展开配置下拉菜单,然后选择新建...。
  5. Type the Name of the solution configuration. 键入解决方案配置的名称
  6. Select Copy settings from whichever project configuration makes sense. 任何有意义的项目配置中选择“ 复制设置”
  7. Click OK . 单击确定

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM