如何使用我创建的 Visual Studio 2010 项目模板 [英] How do I use a Visual Studio 2010 Project Template I created

查看:31
本文介绍了如何使用我创建的 Visual Studio 2010 项目模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我按照 MSDN 上的步骤创建模板.我在 VS2010 中创建了一个新项目,然后使用 File->Export Template... 选项来创建我的模板.我通过了向导,一切似乎都有意义.我单独保留了默认的输出位置(它是:

I followed the steps on MSDN for creating a template. I created a new project in VS2010 and then used the File->Export Template... option to create my template. I went through the wizard and everything seemed to make sense. I left the default Output location alone (it was:

...Documents\Visual Studio 2010\My Exported Templates\MyProject.zip)

...Documents\Visual Studio 2010\My Exported Templates\MyProject.zip)

并且我保留了自动将模板导入 Visual Studio 的选中状态.我可以看到导出的 zip 文件(我尝试将副本移动到:

and I left the Automatically import the template into Visual Studio checked. I can see the exported zip file (and I tried moving a copy to the:

Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#

Documents\Visual Studio 2010\Templates\ProjectTemplates\Visual C#

文件夹.但是当我启动一个新的 VS2010 实例并使用 File->New Project 时,我看不到我的模板.我期待除了最近的模板/已安装的模板/在线模板之外,我可能会为用户模板添加一个新类别.失败了,我认为它可能在已安装的模板下,但那里没有什么新东西.我的模板应该出现在哪里?我错过了一步吗?

folder. But when I start up a new instance of VS2010 and use File->New Project I don't see my template. I was expecting that in addition to RecentTemplates/ Installed Templates/ Online Templates I might get a new category for User Templates. Failing that I thought it might be under Installed Templates but there is nothing new there. Where is my template supposed to appear? Did I miss a step?

推荐答案

呃,它正在工作,我只是不知道在哪里看.我会调出新的项目模板并搜索所有叶节点.结果我不得不在树视图中单击 Visual C# 根(它似乎不在任何叶子中).这总是让我在树视图中绊倒,我从不期望根有选项,更不用说是唯一有选项的地方了.

Duh, It was working I just didn't know where to look. I would bring up the new project template and search through all the leaf nodes. Turns out I had to click on the Visual C# root in the tree view (it appears to not be in any of the leafs). This always trips me up in tree views, I never expect the root to have options, let alone be the only place that has an option.

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

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