title | description | keywords | author | manager | ms.date | ms.topic | ms.prod | ms.technology | ms.devlang | ms.assetid |
---|---|---|---|---|---|---|---|---|---|---|
dotnet-new |
dotnet-new |
.NET, .NET Core |
mairaw |
wpickett |
06/20/2016 |
article |
.net-core |
.net-core-technologies |
dotnet |
263c3d05-3a47-46a6-8023-3ca16b488410 |
dotnet-new -- Creates a new .NET Core project
dotnet new [--type] [--lang]
The dotnet new
command provides a convenient way to initialize a valid .NET Core project and sample source code to try out the Command Line Interface (CLI) toolset.
This command is invoked in the context of a directory. When invoked, the command will result in two main artifacts being dropped to the directory:
- A
Program.cs
(orProgram.fs
) file that contains a sample "Hello World" program. - A valid
project.json
file.
After this, the project is ready to be compiled and/or edited further.
-l
, --lang [C#|F#]
Language of the project. Defaults to C#
. csharp
(fsharp
) or cs
(fs
) are also valid options.
-t
, --type
Type of the project. Valid values are console
, web
, lib
and xunittest
.
dotnet new
Drops a C# project in the current directory.
dotnet new --lang f#
Drops an F# project in the current directory.
dotnet new --lang c#
Drops an C# project in the current directory.
dotnet new -t web
Drops a new ASP.NET Core project in the current directory.