AdventOfCode.Framework
2.2.0
See the version list below for details.
dotnet add package AdventOfCode.Framework --version 2.2.0
NuGet\Install-Package AdventOfCode.Framework -Version 2.2.0
<PackageReference Include="AdventOfCode.Framework" Version="2.2.0" />
<PackageVersion Include="AdventOfCode.Framework" Version="2.2.0" />
<PackageReference Include="AdventOfCode.Framework" />
paket add AdventOfCode.Framework --version 2.2.0
#r "nuget: AdventOfCode.Framework, 2.2.0"
#:package AdventOfCode.Framework@2.2.0
#addin nuget:?package=AdventOfCode.Framework&version=2.2.0
#tool nuget:?package=AdventOfCode.Framework&version=2.2.0
Advent of Code Framework
C# framework to interactively bootstrap Advent of Code solutions.
Getting Started
The entry point to the framework is the AdventOfCodeRunner. From here you can either run in a full interactive mode
via AdventOfCodeRunner.Run or specify fixed options via methods like AdventOfCodeRunner.Solve. Solutions setup as
in Solutions will be picked up automatically, but the runner will guide through this.
Solutions
A Solution represents the logic to solve both problems for a particular puzzle day. Solutions should both implement
ISolution and be attributed with SolutionAttribute as follows:
[Solution(Day = 1)]
internal class SampleSolution : ISolution
{
/// <inheritdoc />
public string SolveProblem1(ProblemInput input, ISolutionLogger logger)
{
...
}
/// <inheritdoc />
public string SolveProblem2(ProblemInput input, ISolutionLogger logger)
{
...
}
}
Inputs and Outputs
When a problem is run for the first time, input and output files need to be provided. These are prompted for via Notepad by the runner, and the user is expected to save and exit Notepad to continue (similar to command line Git). Initially required files are the input and output of the example part of the problem, plus the input of the main problem (the file will indicate the data expected).
After running the solution to the main problem the option will be given to save the output.
Inputs and outputs will be persisted at %LocalAppData%\Advent of Code and can be edited there if they require
updating.
Logging
Due to the interactive nature of the runner, writing to the console directly has undefined behaviour. To log in solutions a logger is passed in which is compatible with the interactive console.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Humanizer.Core (>= 3.0.1)
- Spectre.Console (>= 0.54.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 2.6.2 | 235 | 12/6/2025 | |
| 2.6.1 | 227 | 12/6/2025 | |
| 2.6.0 | 229 | 12/6/2025 | |
| 2.5.2 | 206 | 12/5/2025 | |
| 2.5.1 | 204 | 12/5/2025 | |
| 2.5.0 | 219 | 12/3/2025 | |
| 2.4.1 | 439 | 11/30/2025 | |
| 2.4.0 | 424 | 11/30/2025 | |
| 2.3.0 | 755 | 11/30/2025 | |
| 2.2.0 | 694 | 11/30/2025 | |
| 2.1.0 | 689 | 11/30/2025 | |
| 2.0.0 | 765 | 11/30/2025 | |
| 1.3.8 | 528 | 12/14/2022 | |
| 1.3.2 | 439 | 12/13/2022 | |
| 1.3.0 | 652 | 12/11/2022 | |
| 1.2.1 | 463 | 12/8/2022 | |
| 1.1.2 | 472 | 12/3/2022 | |
| 1.1.1 | 448 | 12/3/2022 | |
| 1.1.0 | 451 | 12/3/2022 | |
| 1.0.0 | 447 | 12/2/2022 |