giraffe-fsharp / giraffe-template

A dotnet new template for Giraffe web applications.
Apache License 2.0
37 stars 22 forks source link

Nothing happens when running dotnet new giraffe #8

Closed vaindil closed 6 years ago

vaindil commented 6 years ago

I installed giraffe-template and attempted to create a new project, but nothing happens when I run the command. My output is below. I'm starting in a new, empty directory. Running dotnet new mvc (for example) works properly, it's only giraffe that doesn't work.

C:\Users\vaindil\Documents\notes-api-fsharp
λ dotnet new -l
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 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 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

C:\Users\vaindil\Documents\notes-api-fsharp
λ dotnet new -i "giraffe-template::*"
  Restoring packages for C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\restore.csproj...
  Installing giraffe-template 0.11.0.
  Generating MSBuild file C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\obj\restore.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\obj\restore.csproj.nuget.g.targets.
  Restore completed in 993.21 ms for C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\restore.csproj.

  Restoring packages for C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\restore.csproj...
  Installing giraffe-template 0.11.0.
  Generating MSBuild file C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\obj\restore.csproj.nuget.g.props.
  Generating MSBuild file C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\obj\restore.csproj.nuget.g.targets.
  Restore completed in 791.48 ms for C:\Users\vaindil\.templateengine\dotnetcli\v2.1.2\scratch\restore.csproj.

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
Giraffe Web App                                   giraffe          F#                Web/Giraffe/ASP.NET
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 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 viewimports --namespace
    dotnet new --help

C:\Users\vaindil\Documents\notes-api-fsharp
λ dotnet new giraffe
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.

Giraffe Web App (F#)
Author: Dustin Moris Gorski, David Sinclair and contributors
Options:
  -V|--ViewEngine
                         giraffe      - Default GiraffeViewEngine
                         razor        - MVC Razor views
                         dotliquid    - DotLiquid template engine
                     Default: giraffe

  -I|--IncludeTests
                     bool - Optional
                     Default: false

C:\Users\vaindil\Documents\notes-api-fsharp
λ dir
 Volume in drive C is SSD
 Volume Serial Number is [censored]

 Directory of C:\Users\vaindil\Documents\notes-api-fsharp

12/25/2017  01:54 PM    <DIR>          .
12/25/2017  01:54 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  108,673,515,520 bytes free

C:\Users\steven.hall\Documents\notes-api-fsharp
λ dotnet new giraffe --force
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.

Giraffe Web App (F#)
Author: Dustin Moris Gorski, David Sinclair and contributors
Options:
  -V|--ViewEngine
                         giraffe      - Default GiraffeViewEngine
                         razor        - MVC Razor views
                         dotliquid    - DotLiquid template engine
                     Default: giraffe

  -I|--IncludeTests
                     bool - Optional
                     Default: false

C:\Users\steven.hall\Documents\notes-api-fsharp
λ dir
 Volume in drive C is SSD
 Volume Serial Number is [censored]

 Directory of C:\Users\steven.hall\Documents\notes-api-fsharp

12/25/2017  01:54 PM    <DIR>          .
12/25/2017  01:54 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  108,729,307,136 bytes free
dustinmoris commented 6 years ago

Hi, could you try running dotnet new giraffe -lang F#? There is currently a bug which has been fixed only recently and I think even though the issue has been closed it hasn't been released yet, so you might have to specify the -lang F# parameter until the bug fix has been rolled out as a new version of the CLI tools.

vaindil commented 6 years ago

Ah, that did it. I thought I checked the closed issues but I must not have, it's the second from the top in that list right now. My apologies. Thank you!