Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Dotnet new dir lang/type #1124

Closed

Conversation

enricosada
Copy link

ref #655

add dir and lang/type arguments, full is dotnet new dir lang/type.
the --type and --lang works too.

Default are:

  • dir empty => .
  • lang/type empty => csharp/console

so dotnet new = dotnet new . csharp/console like current behaviour

If dir exists => error

Some examples:

PS D:\github\cli\prova> dotnet new hello_world
Created new C# Console project in D:\github\cli\prova\hello_world.

PS D:\github\cli\prova> dotnet new hello2 console
Created new C# Console project in D:\github\cli\prova\hello2.

PS D:\github\cli\prova> dotnet new hello2 fsharp/console
Directory hello2 already exists

PS D:\github\cli\prova> dotnet new hello3 fsharp/console
Created new F# Console project in D:\github\cli\prova\hello3.

PS D:\github\cli\prova> dotnet new hello5 --type console
Created new C# Console project in D:\github\cli\prova\hello5.

PS D:\github\cli\prova> dotnet new . console
Created new C# Console project in D:\github\cli\prova.

PS D:\github\cli\prova> dotnet new --lang f# hello7 console
Created new F# Console project in D:\github\cli\prova\hello7.

PS D:\github\cli\prova> dotnet new --lang f# hello7 suave
Unrecognized type: suave
Avaiable types for F# :
- Console

ready for review /cc @blackdwarf


This change is Reviewable

@enricosada
Copy link
Author

@dotnet-bot test Ubuntu Debug please

@enricosada
Copy link
Author

i think i need to wait for Ubuntu to become green again

@enricosada
Copy link
Author

@dotnet-bot test Ubuntu Debug Build please

@enricosada
Copy link
Author

@dotnet-bot test Ubuntu Release Build please

@enricosada
Copy link
Author

ok @blackdwarf @piotrpMSFT that's ready to review/merge

@enricosada
Copy link
Author

ping @blackdwarf because i think it's nice if we can scaffold a library type too instead of app only, it's really useful (ppl can learn basic usage of project.json with this tool, like library/app)

and dir is nice for demo and hello world 😄

@enricosada
Copy link
Author

try to unstuck jenkins

@enricosada
Copy link
Author

rebased and ready

@enricosada
Copy link
Author

closed in favor of #2052

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants