AdventOfCode.Framework 2.6.2

dotnet add package AdventOfCode.Framework --version 2.6.2
                    
NuGet\Install-Package AdventOfCode.Framework -Version 2.6.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AdventOfCode.Framework" Version="2.6.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdventOfCode.Framework" Version="2.6.2" />
                    
Directory.Packages.props
<PackageReference Include="AdventOfCode.Framework" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AdventOfCode.Framework --version 2.6.2
                    
#r "nuget: AdventOfCode.Framework, 2.6.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AdventOfCode.Framework@2.6.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AdventOfCode.Framework&version=2.6.2
                    
Install as a Cake Addin
#tool nuget:?package=AdventOfCode.Framework&version=2.6.2
                    
Install as a Cake Tool

NuGet version

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.

Sample

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)
    {
        ...
    }
}

The solution attribute can also be used to enable/disable a solution and mark it as solved to deprioritize it in lists.

Problems

Each solution has a 'solve' method for each problem, which can return a string answer to the problem, or null if the problem has not been solved.

Both the problem input and a logger are passed to the solve methods. The problem input can be consumed as either the raw string, the input lines or a matrix (if the input is of fixed width and height):

var inputRaw = input.Raw;
var inputLines = input.Lines;
var inputMatrix = input.Matrix;

Due to the interactive nature of the runner, writing to the console directly has undefined behaviour, whereas the logger is compatible with the interactive console.

Inputs and Answers

When a problem is run for the first time, input and answer 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 answer of the example part of the problem, plus the puzzle input (the files will indicate the data expected).

After running the solution to the main problem the option will be given to save the answer.

Inputs and answers will be persisted at %LocalAppData%\Advent of Code and can be edited there if they require updating.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 226 12/6/2025
2.6.0 228 12/6/2025
2.5.2 206 12/5/2025
2.5.1 204 12/5/2025
2.5.0 218 12/3/2025
2.4.1 438 11/30/2025
2.4.0 424 11/30/2025
2.3.0 755 11/30/2025 2.3.0 is deprecated because it has critical bugs.
2.2.0 693 11/30/2025 2.2.0 is deprecated because it has critical bugs.
2.1.0 689 11/30/2025 2.1.0 is deprecated because it has critical bugs.
2.0.0 765 11/30/2025 2.0.0 is deprecated because it has critical bugs.
1.3.8 528 12/14/2022
1.3.2 439 12/13/2022
1.3.0 652 12/11/2022 1.3.0 is deprecated because it has critical bugs.
1.2.1 463 12/8/2022
1.1.2 471 12/3/2022
1.1.1 448 12/3/2022
1.1.0 451 12/3/2022
1.0.0 447 12/2/2022