Following the instructions at this doc, I
- Created a new "ASP.NET Core Web Application" and selected "API" from the follow on menu.
- I made a small change to the provided "ValuesController.cs", then clicked Project > Export Template.
- Selected "Item template", clicked next
Selected "ValuesController.cs" from the controllers folder, clicked next.
Didn't check any dependencies, clicked next
- Named it "MyControllerTemplate" and didn't add any icons. clicked finish
After all that, I ended up with "MyControllerTemplate.zip" in two places:
- Visual Studio 2017 > My Exported Templates
- Visual Studio 2017 > Templates > ItemTemplates
According to the doc, that should have been enough. After closing and reopening VS2017, I go to add a new item, and my installed choices are limited to Xamarin.Forms and ASP.NET Core, neither of which have my newly created template.
I also tried it again after extracting the zip file in both places.
Based on another stack overflow, I also tried changing <ProjectType>CSharp</ProjectType> to <ProjectType>DNX</ProjectType> in the .vstemplate file.
and adding
<TemplateGroupID>SharedDotNetAndDotNetWeb</TemplateGroupID>
as well as <TemplateGroupID>DotNetWeb</TemplateGroupID>
None of this has made the template visible to me.
Is there something else I need to do, or a step I am messing up?
Edit 1: Tried moving the zip file and extracted files into the Visual C# folder under ItemTemplates, neither worked.