This is a template project for me to build C# projects with while I am learning and automates some of the dotnet tooling
Warning
To make use of this template you will need to have installed Just, as well as the DotNet Toolchain
- Create a new repo from this template in github
- Clone the repo to your local machine
- [Optional] Change the namespace in the Justfile to your namespace
- run the command
just init-console {{Project Name}}i.e.just init-console MyApp
- NAMESPACE : The namespace to use when creating projects (default: DotMH)
- LIB_POSTFIX : The postfix to append to library project names (default: Lib)
- TEST_POSTFIX : The postfix to append to Test project names (default: Tests)
- API_POSTFIX : The postfix to append to API project names (default: Api)
- UPDATE_URL : The main just task file to update from (default: this repo's ./justfile)
To see a list of the available Just commands run just -l or just help
If you want to get the latest justfile in an exciting project you can run just update it will back up your current justfile as justfile.bak and then download and install the lastest one from UPDATE_URL which is defaulted to this repo
Creates a new solution using NAME, this is done by adding a gitignore and a solution
just init-sln MyProject- NAME : The name (without) the namespace to give your solution
Creates a new C# class library with the name {{NAMEPACE}}.{{NAME}}{{LIB_POSTFIX}}. It will also create a
test project named {{NAMEPACE}}.{{NAME}}{{LIB_POSTFIX}}Tests. The new project will be added to the solution
just init-library MyLibrary- NAME : The name (without) the namespace to give your library, it will be given the post fix defined in LIB
Creates a new complete Library Solution, with the name {{NAMEPACE}}.{{NAME}}. It will generate
- A solution
- A Library
- Tests for the Library
- Link it all together in the solution.
just init-library-sln MyLibrary- NAME: The name (without) the namespace to give a library solution
Create a new Command Line (Console) app, with the name {{NAMEPACE}}.{{NAME}}. It will also create a
test project named {{NAMEPACE}}.{{NAME}}Test. The new project will be added to the solution
just init-console-app MyApp- NAME: The name (without) the namespace to give a command line (console) app
Creates a new complete Command Line (Console) Solution, with the name {{NAMEPACE}}.{{NAME}}. It will generate
- A solution
- A Console App
- A Library
- Tests for the Console App
- Tests for the Library
- Link it all together in the solution.
just init-console-sln MyApp- NAME: The name (without) the namespace to give a command line (console) solution
Create a new Web Api (webapi) app, with the name {{NAMEPACE}}.{{NAME}}. It will also create a
test project named {{NAMEPACE}}.{{NAME}}Test. The new project will be added to the solution
just init-webapi-app MyApi- NAME: The name (without) the namespace to give a Web Api (webapi) app
Creates a new complete Web Api solution, with the name {{NAMEPACE}}.{{NAME}}. It will generate
- A solution
- A Web Api App
- A Library
- Tests for the Web Api App
- Tests for the Library
- Link it all together in the solution.
just init-webapi-sln MyAPI- NAME: The name (without) the namespace to give a Web Api (webapi) solution
Creates a GUI Application based on Avalonia https://avaloniaui.net/ using the MVVM template
Note if the template isn't already installed, it will install it first.
just init-gui-app MyGuiApp- NAME: The name (without) the namespace to give a Gui App (avalonia.mvvm) project
Creates a GUI Application Solution based on Avalonia https://avaloniaui.net/ using the MVVM template
Note if the template isn't already installed, it will install it first.
- A solution
- A Gui App
- A Library
- Tests for the Gui App
- Tests for the Library
- Link it all together in the solution.
just init-gui-sln MyGuiApp- NAME: The name (without) the namespace to give a Gui App (avalonia.mvvm) solution
This repo is set up with an Apache 2.0 license and this will carry over to any projects that are generated from the template unless you remove it.