一个包含两个表单的项目,为每个表单构建两个单独的exe文件 [英] One project with two forms inside, build two separate exe files for each form

查看:51
本文介绍了一个包含两个表单的项目,为每个表单构建两个单独的exe文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个问题,在一个VS2010项目中有两种格式,是否要为每种格式分别输出.exe文件?有什么建议吗?
表单共享相同的数据,但功能不同.

This is the question, have two forms in one VS2010 project, want to have output of separate .exe files for each form? Any suggestions?
Forms are sharing the same data, but have different functionality..

推荐答案

从理论上讲,您可以使用两个不同的构建配置和预处理器定义以及单独的构建配置,但是我无法想到一个单独的实例好事.

Theoretically, you could use two different build configurations and pre-processor definitions and separate build configurations, but I can't think of a single instance where this would be good thing to do.

相反,您可能需要将代码分成3个项目.两种形式的应用程序和1种库.将它们之间的通用代码放入库中.

Instead, you'll probably want to separate your code into 3 projects. Two forms applications, and 1 library. Put the code that is common between them into the library.

这篇关于一个包含两个表单的项目,为每个表单构建两个单独的exe文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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