giraffe-fsharp / giraffe-template

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

Cannot create new project with .NET Core 2.1.4 #11

Closed conniey closed 6 years ago

conniey commented 6 years ago

Repro:

Expected: A project is created

Actual: I get a help message. I've tried specifying the ViewEngine as well to no avail.

C:\users\conniey\Source\Repos\giraffe-app
λ 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
                         none         - No template engine (API only)
                     Default: giraffe

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

  -U|--UsePaket
                     bool - Optional
                     Default: false
realparadyne commented 6 years ago

I'm getting the same thing, just when I wanted to try out giraffe for the first time too. dotnet --version reports 2.1.4

Edit: Ah, found it, you need to add -lang F# due to a bug that has been fixed downstream.

dustinmoris commented 6 years ago

Hi,

Yes this is a very annoying bug which is causing a lot of confusion unfortunately.

It has been fixed ages ago but not been released by Microsoft yet 😣.

I'll document it in the README later tonight!

Workaround is described here: https://github.com/giraffe-fsharp/giraffe-template/issues/8#issuecomment-353890940

On 13 Feb 2018 17:01, "realparadyne" notifications@github.com wrote:

I'm getting the same thing, just when I wanted to try out giraffe for the first time too. dotnet --version reports 2.1.4

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/giraffe-fsharp/giraffe-template/issues/11#issuecomment-365332347, or mute the thread https://github.com/notifications/unsubscribe-auth/AEXlapIoRDamBYo0rWG4OyEsYkvHmEbqks5tUb_kgaJpZM4SAoI4 .

dustinmoris commented 6 years ago

I've added a note to the README now. Hope this helps new people coming to Giraffe!