dotnet new
templates
Jeevan General commands
Action | Command |
---|---|
Publish new templates | .\publish.bat <version> |
Install templates | dotnet new -i Jeevan.Templates --nuget-source https://www.myget.org/F/jeevanjames/api/v3/index.json |
Uninstall templates | dotnet new -u Jeevan.Templates |
Template reference
## Common arguments
# For solution (jeevan-sln)
--basens, -b (Required): The base namespace for all projects in this solution. Set as a variable in the `Directory.Build.props` file, so that projects can use it as the base to define their root namespace.
# For project templates (jeevan-console, jeevan-classlib, etc)
--relativens, -r (Required): The namespace of the project relative to the base namespace specified at the solution level.
jeevan-sln
)
.NET Core solution (Creates a solution with supporting files such as .editorconfig
, Directory.Build.props
, .gitignore
, Cake Build files, etc. Also creates two subdirectories - src
and test
.
dotnet new jeevan-sln --basens <base namespace>
# Examples
dotnet new jeevan-sln --basens Jeevan.MyNamespace
dotnet new jeevan-sln -n LibraryManager -o . -b Jeevan.LibraryManager
jeevan-console
)
Console application (Creates a regular console project.
dotnet new jeevan-console --relativens <relative namespace>
# Examples
dotnet new jeevan-console --relativens Cli
dotnet new jeevan-console -o .\src\Cli -r Cli
jeevan-console-tool
)
Console tool (Creates a console application that doubles as a dotnet
tool.
dotnet new jeevan-console-tool --relativens Cli --tool-name mycli
dotnet new jeevan-console-tool -o .\src\Cli -r Cli --tool-name mycli
--tool-name
(Required): The name of the tool and assembly.