damienbod / AngularWebpackVisualStudio

Template for ASP.NET Core, Angular with Webpack and Visual Studio
https://damienbod.com/2016/06/12/asp-net-core-angular2-with-webpack-and-visual-studio/
MIT License
488 stars 128 forks source link

Unable to run dot net new #130

Closed ElanHasson closed 6 years ago

ElanHasson commented 6 years ago
c:\webpacktmpl\x>dotnet new angularwebapi
Template "ASP.NET Core with Angular and Webpack" could not be created.
Object reference not set to an instance of an object.

I installed the template as instructed in the readme.


dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d
FabianGosebrink commented 6 years ago

what is the output if you type dotnet new without any parameters after installing the template?

ElanHasson commented 6 years ago

c:\webpacktmpl\x>dotnet new Usage: new [options]

Options: -h, --help Displays help for this command. -l, --list Lists templates containing the specified name. If no name is specified, lists all templates. -n, --name The name for the output being created. If no name is specified, the name of the current directory is used. -o, --output Location to place the generated output. -i, --install Installs a source or a template pack. -u, --uninstall Uninstalls a source or a template pack. --type Filters templates based on available types. Predefined values are "project", "item" or "other". --force Forces content to be generated even if it would change existing files. -lang, --language Specifies the language of the template to create.

Templates Short Name Language Tags

Console Application console [C#], F#, VB Common/Console Class library classlib [C#], F#, VB Common/Library Unit Test Project mstest [C#], F#, VB Test/MSTest xUnit Test Project xunit [C#], F#, VB Test/xUnit ASP.NET Core Empty web [C#], F# Web/Empty ASP.NET Core Web App (Model-View-Controller) mvc [C#], F# Web/MVC ASP.NET Core Web App razor [C#] Web/MVC/Razor Pages ASP.NET Core with Aurelia aurelia [C#] Web/MVC/SPA ASP.NET Core with Knockout.js knockout [C#] Web/MVC/SPA ASP.NET Core with Vue.js vue [C#] Web/MVC/SPA ASP.NET Core with Angular angular [C#] Web/MVC/SPA ASP.NET Core with React.js react [C#] Web/MVC/SPA ASP.NET Core with React.js and Redux reactredux [C#] Web/MVC/SPA ASP.NET Core with Angular and Webpack angularwebapi [C#] Web/SPA/Angular ASP.NET Core Web API webapi [C#], F# Web/WebAPI global.json file globaljson Config Nuget Config nugetconfig Config Web Config webconfig Config Solution File sln Solution Razor Page page Web/ASP.NET MVC ViewImports viewimports Web/ASP.NET MVC ViewStart viewstart Web/ASP.NET

Examples: dotnet new mvc --auth Individual dotnet new web dotnet new --help

k-krupka commented 6 years ago

are you sure, that there is no extra global.json file which can cause SDK version problems?

ElanHasson commented 6 years ago

Yes-- this is a new directory tree.

danpowell88 commented 6 years ago

I'm having the same issue

aph5nt commented 6 years ago

what is a status on this? I have the same issue

FabianGosebrink commented 6 years ago

So I did reset my PC, installed everything new, cloned new and ran that commands

C:\_git\FabianGosebrink\AngularWebpackVisualStudio\src\AngularWebpackVisualStudio>dotnet new --install C:\_git\FabianGosebrink\AngularWebpackVisualStudio\src\AngularWebpackVisualStudio
Templates                                         Short Name         Language          Tags
----------------------------------------------------------------------------------------------------------
Console Application                               console            [C#], F#, VB      Common/Console
Class library                                     classlib           [C#], F#, VB      Common/Library
Unit Test Project                                 mstest             [C#], F#, VB      Test/MSTest
xUnit Test Project                                xunit              [C#], F#, VB      Test/xUnit
ASP.NET Core Empty                                web                [C#], F#          Web/Empty
ASP.NET Core Web App (Model-View-Controller)      mvc                [C#], F#          Web/MVC
ASP.NET Core Web App                              razor              [C#]              Web/MVC/Razor Pages
ASP.NET Core with Angular                         angular            [C#]              Web/MVC/SPA
ASP.NET Core with React.js                        react              [C#]              Web/MVC/SPA
ASP.NET Core with React.js and Redux              reactredux         [C#]              Web/MVC/SPA
ASP.NET Core with Angular and Webpack             angularwebapi      [C#]              Web/SPA/Angular
ASP.NET Core Web API                              webapi             [C#], F#          Web/WebAPI
global.json file                                  globaljson                           Config
Nuget Config                                      nugetconfig                          Config
Web Config                                        webconfig                            Config
Solution File                                     sln                                  Solution
Razor Page                                        page                                 Web/ASP.NET
MVC ViewImports                                   viewimports                          Web/ASP.NET
MVC ViewStart                                     viewstart                            Web/ASP.NET

Examples:
    dotnet new mvc --auth Individual
    dotnet new angularwebapi
    dotnet new --help

C:\_git\FabianGosebrink\AngularWebpackVisualStudio\src\AngularWebpackVisualStudio>cd \

C:\>cd _git

C:\_git>dotnet new angularwebapi
The template "ASP.NET Core with Angular and Webpack" was created successfully.

C:\_git>

So I can not reproduce that issue. @damienbod will try as well today.

Which dotnet version are ou running?

C:\_git>dotnet --version
2.0.3