Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI 2.1.4: F# only templates get usage displayed when --language option is not passed explicitly #1401

Closed
theimowski opened this issue Jan 22, 2018 · 3 comments

Comments

@theimowski
Copy link

https://www.nuget.org/api/v2/package/SAFE.Template/0.5.1

The same works fine with dotnet CLI 2.1.3

When creating project in dotnet CLI 2.1.4 from SAFE template, only usage is displayed:

λ dotnet new -i SAFE.Template

(...)
Templates                                         Short Name       Language          Tags
----------------------------------------------------------------------------------------------------------------------------
(...)
SAFE-Stack Web App v0.5.1                         SAFE             F#                F#/Web/Suave/Fable/Elmish/Giraffe/Bulma
(...)

λ dotnet new SAFE                                                                                                                 
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.                                                           
                                                                                                                                  
                                                                                                                                  
SAFE-Stack Web App v0.5.1 (F#)                                                                                                    
Author: Tomasz Heimowski                                                                                                          
Options:                                                                                                                          
  -S|--Server                                                                                                                     
                     suave      - lightweight, non-blocking web server (standalone)                                               
                     giraffe    - a functional micro web framework based on ASP.NET Core                                          
                 Default: suave                                                                                                   
                                                                                                                                  
  -F|--Fulma                                                                                                                      
                     none       - don't add Fulma (Fable bindings for Bulma.io) at all                                            
                     basic      - adds Fulma basic template                                                                       
                     hero       - adds Fulma with 'Hero' Bulma template from https://dansup.github.io/bulma-templates/            
                     landing    - adds Fulma with 'Landing' Bulma template from https://dansup.github.io/bulma-templates/         
                 Default: none                                                                                                    
                                                                                                                                  
  -R|--Remoting  adds Fable.Remoting to server and client                                                                         
                 bool - Optional                                                                                                  
                 Default: false                                                                                                   
λ dotnet --info
.NET Command Line Tools (2.1.4)

Product Information:
 Version:            2.1.4
 Commit SHA-1 hash:  5e8add2190

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.15063
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   c:\dotnet\sdk\2.1.4\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.5
  Build    : 17373eb129b3b05aa18ece963f8795d65ef8ea54
@theimowski theimowski changed the title dotnet new SAFE displays usage instead of creating project in CLI 2.1.4 CLI 2.1.4: F# only templates get usage displayed when --language option is not passed explicitly Jan 22, 2018
@theimowski
Copy link
Author

Apparently, passing --language F# does the job - this template is F#-only so this parameter should not be required.

@mlorbetske
Copy link
Contributor

I believe this is related to #1373 (fixed in #1375) where if the template doesn't have a language that matches the "default" (C#) that the language must be explicitly passed. In this case, dotnet new SAFE -lang F# should work.

@theimowski
Copy link
Author

right, closing then and waiting for .net core 2.1.0 runtime release
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants