在共享代码的同一解决方案中构建应用程序的完整版和免费版 [英] Building Full and Free versions of an app in the same solution sharing the code

查看:50
本文介绍了在共享代码的同一解决方案中构建应用程序的完整版和免费版的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


是否可以在同一VS解决方案中创建产品的变体而无需复制代码?


通常情况下 - 需要一个不同的产品名称和其他产品特定的属性。可能是不同的库等。


使用预处理器指令和配置可以轻松控制代码中的其他所有内容。


到目前为止 - 我看到的唯一方法这可能是创建一个新项目,然后手动修改它,从主项目中添加现有代码等。大量的手工劳动。


所以基本上 - 我们需要的是像" ;重复项目" VS解决方案资源管理器中的选项,它将创建项目的精确副本,所有现有文件只需链接(未复制)和强制性的产品特定文件,即可重新创建。


任意帮助将不胜感激。


解决方案

由于具体要求因公司而异或个人。首选方法是使用宏,


http://msdn.microsoft.com/en-us/library/b4c73967(v = VS.80)的.aspx


Hello,

is it possible to create variations of a product within the same VS solution without copying the code?

Normally - one would need a different product name and other product-specific properties. Possibly different libraries etc.

Everything else in the code can be controlled easily with preprocessor directives and configurations.

So far - the only way I see this being possible is to create a new project, then manually modify it, add existing code from the main project etc. Lots of manual labor.

So basically - what we need is something like "Duplicate Project" option in VS solution explorer which would create an exact copy of the project with all existing file simply linked in (not copied) and mandatory, product specific files, would be re-created.

Any help would be appreciated.

解决方案

Since exact requirements can vary from company to company or individual. The preferred way is to use Macros,

http://msdn.microsoft.com/en-us/library/b4c73967(v=vs.80).aspx


这篇关于在共享代码的同一解决方案中构建应用程序的完整版和免费版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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