Visual Studio 2015 ASP.NET Core RC2: loss of Custom Item Templates

跟風遠走 提交于 2019-11-28 05:48:59

问题


I use Visual Studio 2015 update 2 Community Edition.

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.

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

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>

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


回答1:


This is fixed for me.

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

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

Regards,



来源:https://stackoverflow.com/questions/37457501/visual-studio-2015-asp-net-core-rc2-loss-of-custom-item-templates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!