多项目模板 [英] Multiple Project Template

查看:50
本文介绍了多项目模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我对多个项目模板有疑问.假设我有一个具有3tier架构(主,数据访问层和业务层)的控制台应用程序.当我尝试创建项目模板时,我只能为单层创建.当我尝试访问时,我只能看到创建项目模板时选择的单个项目.我无法使用多项目模板.

如果您有任何想法,可以请您提供帮助..预先感谢.

Hi,

I have a doubt on the Multiple project templates. Let''s say I have a console application with 3tier architecture(Main, Data Access Layer and Business Layer). When i am trying to create project templates i could able to create only for the single layer. and when i am trying to access i could able to see only single which i selected while creating project templates. I couldn''t able to Multi project template.

Can u please help if you have any idea.. Thanks in advance.

推荐答案

是的,您理解正确.模板是应用于单个项目的东西.就我所知,还没有多项目模板之类的东西.显然,可以使用 Visual Studio扩展创建和实现这样的概念,请参见 http: //msdn.microsoft.com/zh-CN/library/dd885119.aspx [
(顺便说一句,请帮自己一个忙:如果您不使用任何版本控制系统,请停止甚至继续玩无人继续开发的想法-不要冒险工作,也不要做任何事情.这种系统可以是免费的,开源的,非常精简的,得到良好支持的并且非常可靠.)

好的,现在,当您需要创建来自模板"这种类型的新解决方案时,请手动复制模板"解决方案,对其进行重命名,然后开始在骨架中添加一些肉".现在,问问自己:为什么在Visual Studio级别上需要任何模板?只是看起来像一个新手?不用担心,您始终可以实现这一目标:-).您不会受到Microsoft或第三方的摆布;您可以轻松地优化模板",创建不同的模板,进行更改等.自由比大哥为您创建的虚幻的酷"员工更重要.而且您没有什么要放松的.

—SA
Yes, you understand it correctly. A template is something applied to a single project. To best of my knowledge, there is no such thing as a multiple-project template. Apparently, such concept can be created and implemented using Visual Studio Extensions, see http://msdn.microsoft.com/en-us/library/dd885119.aspx[^].

The question is: why?

You should understand that Microsoft takes a great care of newbies, sometimes even at the expense of effectiveness of work of experienced developers. A template is a typical example of this. Project templates greatly facilitate the beginner, but really experienced developers could easily develop projects and solutions without those templates. Just the opposite: templates present some minor hassles in developing solutions which are far from available templates. I, for example, start from deleting a good half of staff from a project created from a template before adding some very different stuff.

So, what''s the problem with your 3-tier solutions? I don''t see a problem. Need a template? Create some skeleton solution of 3-tier architecture assembled from all the layers you need in such skeleton. Remove anything which is not common to all the solutions you want to use from your template. Link projects of the solution with proper project dependencies (Visual Studio will do it automatically if you reference projects by "Projects", not by "Browse", which relies on main executable modules of the assemblies.) Done? Now save it in your Revision Control System''s code base and say: this is my template.

(By the way, do yourself a great favor: if you''re not using any Revision Control System, stop even playing with the idea of continuing your development without one — don''t risk your work and just don''t be silly. Such systems can be free, Open Source, very lean, well-supported and extremely reliable.)

OK, now, when you need to create a new solution of this type "from template", manually copy you "template" solution, rename it and start adding some "meat" to your skeleton. And now, ask yourself: why would you need any templates at the level of Visual Studio? Just to look like a newbie? Don''t worry, you can always achieve that :-). You do not live on mercy of Microsoft or third parties; you can easily refine your "templates", create different variants of those, change them, etc. Freedom is more important than a illusory "cool" staff created for you by a big brother. And you have nothing to loose.

—SA



只是偶然发现您的问题,以寻求有关多项目模板的深刻见解.
在我们的网站上,您可以找到示例模板和howtos:
http://www.holisticware.net/HolisticWare/Know-How/Development/multitargeting-portability-interoperability/visual-studio-solutions.aspx [
Hi
Just stumbled upon Your question in search for some deep insights about multi project templates.
On our site You can find sample template and howtos :
http://www.holisticware.net/HolisticWare/Know-How/Development/multitargeting-portability-interoperability/visual-studio-solutions.aspx[^]

We are moving our site to new layout so stuff might be confusing...


regards
mel


这篇关于多项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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