AdventOfCode.Framework 2.2.0

There is a newer version of this package available.
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
                    
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.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AdventOfCode.Framework" Version="2.2.0" />
                    
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.2.0
                    
#r "nuget: AdventOfCode.Framework, 2.2.0"
                    
#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.2.0
                    
#: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.2.0
                    
Install as a Cake Addin
#tool nuget:?package=AdventOfCode.Framework&version=2.2.0
                    
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)
    {
        ...
    }
}

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 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 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.3.0 is deprecated because it has critical bugs.
2.2.0 694 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 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