Visual Studio 2015 ASP.NET Core RC2:自定义项模板丢失 [英] Visual Studio 2015 ASP.NET Core RC2: loss of Custom Item Templates

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

问题描述

我使用 Visual Studio 2015 更新 2 社区版.

I use Visual Studio 2015 update 2 Community Edition.

使用 Visual Studio DotNetCore RC1 工具,我在 DNX 部分下有我的自定义项目模板.我无法提供证明截图,因为我已经转移到 DotNetCore RC2 工具预览版 1.使用最后一组工具时,我丢失了我的项目模板.

With Visual Studio DotNetCore RC1 tools I had my custom Item Template under DNX section. I can't provide proving screenshot because I already moved to DotNetCore RC2 Tools Preview 1. With the last set of tools I lost my Item Template.

我尝试将 ProjectType 和 ProjectSubType 从 DNX 更改为 CSharp/Web,尝试将组件放在不同的位置,但没有成功.

I tried to change ProjectType and ProjectSubType from DNX to CSharp/Web, tried to put component in different places with no success.

最后一个 .vstemplate 文件有以下内容

The last .vstemplate file has the following content

<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
  <TemplateData>
    <DefaultName>ReactComponent</DefaultName>
    <Name>ReactComponent</Name>
    <Description>ReactComponent</Description>
    <TemplateID>Chandrush.ReactComponent</TemplateID>
    <ProjectType>CSharp</ProjectType>
    <ProjectSubType>Web</ProjectSubType>
    <Icon>__TemplateIcon.ico</Icon>
  </TemplateData>
  <TemplateContent>
    <References />
    <ProjectItem TargetFileName="$fileinputname$$fileinputname$.tsx" ReplaceParameters="true">ReactComponent.tsx</ProjectItem>
    <ProjectItem TargetFileName="$fileinputname$package.json" ReplaceParameters="true">package.json</ProjectItem>
    <ProjectItem TargetFileName="$fileinputname$$fileinputname$.scss" ReplaceParameters="true">ComponentStyle.scss</ProjectItem>
  </TemplateContent>
</VSTemplate>

有人知道使用 .NetCore RC2 preview1 工具将自定义项目模板恢复到 VS2015u2 的解决方案吗?

Do anybody know the solution, to get custom Item Templates back to VS2015u2 with .NetCore RC2 preview1 tools?

推荐答案

这对我来说是固定的.

关于您的 .vstemplate 文件,您必须更改这些属性:

Regarding your .vstemplate file, you must have to change these properties :

<ProjectType>DNX</ProjectType>  
<TemplateGroupID>DotNetWeb</TemplateGroupID>

问候,

这篇关于Visual Studio 2015 ASP.NET Core RC2:自定义项模板丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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