Visual Studio 2015 的项目模板 [英] Project template for Visual Studio 2015

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

问题描述

我正在尝试为 Visual Studio 2015 创建一个项目模板.我创建了一个 ASP.NET 5 类库(在 Visual Studio 2015 的 web 部分下)并使用了选项 File->Export template.当我尝试使用导出的模板创建项目时,只会创建 .xproj 文件.模板中的文件和依赖项没有被添加.但同样的过程适用于普通的类库项目.我是不是遗漏了什么.?

I am trying to create a project template for Visual Studio 2015. I created a ASP.NET 5 class library (under the web section of Visual studio 2015) and used the option File->Export template. When I tried to create project using the exported template, only the .xproj file gets created. The files within the template and the dependencies are not getting added. But the same procedure works fine for normal class library project. Am I missing something.?

推荐答案

我找到了这样做的方法.打开 zipfile 并编辑 .vstemplate 文件.缺少的行是

I found the way to do this. Open up the zipfile and edit the .vstemplate file. The line that is missing is

<CreateInPlace>true</CreateInPlace>

这条线在中间

<TemplateData></TemplateData>

这解决了 .NET Core 1.0.1 Tooling Preview 2, VS2015 Update 3 的问题.

This solves the problem for .NET Core 1.0.1 Tooling Preview 2, VS2015 Update 3.

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

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