This repository contains automation script that helps me to create required DotNet projects in specified directory preference.
This script is used as a template to create DotNet projects (tailored to my own preference) which can be used for solving Leet code challenges directly.
This script will create a new directory with the name of the project. Inside this directory, the following projects are created:
-
Class Library
This project will contain all the classes and methods to solve the Leet code challenges. -
Unit Test Project
This project will contain all the unit tests for the classes and methods in the class library. This project will add a reference to the class library project directly. -
Console App
This project will contain the main method to run the code. This project will add a reference to the class library project directly. This project can be used to run the code for adhoc testing.
This package requires the .NET SDK to be installed.
- Visit the official .NET download page.
- Follow the instructions for your operating system.
- Verify the installation by running:
dotnet --version
To install it as pip package, use the following command:
pip install dotnet-leetcode-template
If you've cloned the repository, then use the following command:
dotnet-project.py [-h] -n -s [-f] [--use-program-main]
If you've installed the pip package, then use the following command:
dotnet-leetcode-template [-h] -n -s -[f] [--use-program-main]
options:
-h, --help show this help message and exit
-n, --name name of the project
-s, --solution name of the solution
-f, --framework framework to use for the project
--use-program-main use top level statements in the project