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

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

问题描述

我使用Visual Studio 2015 Update 2社区版。

I use Visual Studio 2015 update 2 Community Edition.

借助Visual Studio DotNetCore RC1工具,我在DNX部分下拥有了自定义项目模板。我无法提供经过验证的屏幕截图,因为我已经移至DotNetCore RC2 Tools Preview1。使用最后一组工具,我丢失了我的项目模板。

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?

推荐答案

对我来说这是固定的。

This is fixed for me.

关于.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天全站免登陆