4

I want to create a seed project for VS 2015 with the basic setup for Angular2 on ASP.NET Core, so I would like to make it as a template.

On the New Project window, under Extensibility I have a C# Project Template, but it targets the Full .NET Framework.

I also tried exporting a .NET Core sample project as template, but it doesn't work with .NET Core either. When I select it as the template for the new project, it as an empty project on VS with a 'Object reference not set to an instance of an object' error on my Error List window.

Is there any other way to create a template for .NET Core?

rbasniak
  • 4,484
  • 11
  • 51
  • 100
  • 2
    I have the same issue. It generates an empty project. – Randy Gamage Aug 30 '16 at 21:58
  • Same issue here. I've exported an existing .NET Core project, but when I use it as a template, I get the same error. – jbarket Oct 09 '16 at 19:29
  • 1
    Possible duplicate of [Project template for Visual Studio 2015](http://stackoverflow.com/questions/33886230/project-template-for-visual-studio-2015) – Paul Hiles Oct 16 '16 at 01:33

2 Answers2

1

I'd like to just move the comment that fixed my problem into the answers. Thanks to @Paul Hiles in the comments above for the following reference: Project template for Visual Studio 2015

While I've been unable to make it work in a multi-solution template. It works perfectly for a single .NET Core project template.

Community
  • 1
  • 1
I. Buchan
  • 421
  • 4
  • 13
-1

You can use the dotnet cli (command-line interface) tool to create this .NET core web projects. It is cross-platform so you can use it in Mac or Linux as well.

Create the dir/folder for the project. In the console, type the following.

folder-name>dotnet new -t web

Then open the project in VS Code by typing the following:

folder-name>code .

That is with a period in the end and hit enter.

alltej
  • 6,787
  • 10
  • 46
  • 87