Code for 2024's Advent of Code challenge.
In the directory, AocTemplate
you'll find a dotnet
template structure so that new days can be added easily. The base usage for this is:
> dotnet new aoc --name Day01
This will create a directory structure that looks like the following:
Day01\
--src\
--Day01.csproj
--input.txt
--Program.cs
--Solver.cs
--tst\
--Day01Tests.csproj
--Day01Tests.cs
> cd Day01/tst
> dotnet build && dotnet test
> cd Day01/src
> dotnet build && dotnet run
To install a template, once you've setup the template directory/structure as per the documentation here (https://docs.microsoft.com/en-us/dotnet/core/tools/custom-templates), then you can simply run the command
> dotnet new install AocTemplate/
To make changes to a template, you have to uninstall it and reinstall it. The uninstall command can be found by running
> dotnet new uninstall
.