简体   繁体   English

在单个解决方案Visual Studio中使用具有不同配置设置的两个项目

[英]Using two projects with different configuration settings in a single solution visual studio

I am using aa single solution to reside two projects in visual studio 2012. 我正在使用一个解决方案在Visual Studio 2012中驻留两个项目。

Project 1: 项目1:

  • wpf WPF
  • uses "any cpu" configurations (which is a must) 使用“任何CPU”配置(这是必须的)

Project 1: 项目1:

  • winforms 的WinForms
  • uses "x86" configurations (which is a must again) 使用“ x86”配置(必须再次使用)

the solution runs like this. 解决方案是这样运行的。

the window from wpf application opens up as startup window. 来自wpf应用程序的窗口将作为启动窗口打开。 from here a button is pressed to open a form in winform project. 从这里按下按钮以在Winform项目中打开一个表单。

Problem: if i keep the configuration as any cpu, the winform window wont open up and give an error. 问题:如果我将配置保留为任何cpu,则winform窗口不会打开并给出错误。 If i keep the configuration as x86 the wpf would give an error becasue the mlapp (matlab application) i am using wont be recognised. 如果我将配置保留为x86,则wpf会给出错误,因为我正在使用的mlapp(matlab应用程序)不会被识别。

please help. 请帮忙。

The solution is to set individual projects to respective configurations as per requirement and then setting the overall solution configuration to "mixed platforms". 解决方案是根据需求将各个项目设置为相应的配置,然后将整体解决方案配置设置为“混合平台”。 it worked 有效

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

相关问题 一个Visual Studio解决方案中是否可以有两个不同类型的项目(即,桌面项目和Web项目)? - Can you have two projects of different types (i.e. a desktop project and a web project) in a single visual studio solution? Visual Studio解决方案:获取与构建配置相关的项目 - Visual Studio Solution: Get projects related to a build configuration 我可以使用 c# 在 Visual Studio 中的同一解决方案中使用两个项目吗 - Can I use two projects in same solution in Visual Studio using c# 同一解决方案 Visual Studio 中每个项目的不同测试设置 - Different Test Settings per project in same solution Visual Studio Visual Studio 解决方案资源管理器未在解决方案中显示项目 - Visual Studio Solution Explorer not showing projects in solution 不同解决方案项目的定制配置文件 - Custom configuration file for different solution projects Visual Studio 2019 解决方案中的最大项目数量 - Maximum amount of projects in visual studio 2019 solution 具有多个项目的Visual Studio解决方案:参考路径 - Visual Studio Solution with Multiple Projects: Reference Paths Visual Studio中大解决方案中最受欢迎的项目 - Favorite projects in big solution in Visual Studio 以编程方式将多个项目添加到Visual Studio解决方案中? - Add multiple projects programmatically into Visual Studio solution?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM