NetMentor.AdventOfCode 0.1.0

dotnet add package NetMentor.AdventOfCode --version 0.1.0
                    
NuGet\Install-Package NetMentor.AdventOfCode -Version 0.1.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="NetMentor.AdventOfCode" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetMentor.AdventOfCode" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="NetMentor.AdventOfCode" />
                    
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 NetMentor.AdventOfCode --version 0.1.0
                    
#r "nuget: NetMentor.AdventOfCode, 0.1.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 NetMentor.AdventOfCode@0.1.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=NetMentor.AdventOfCode&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=NetMentor.AdventOfCode&version=0.1.0
                    
Install as a Cake Tool

NetMentor.AdventOfCode

Library to help you on the execution of advent of code challenges using C#

Pacakge in nuget .NET
NetMentor.AdventOfCode 7.0

Usage

once the library is imported you can use the abstract class AoCSolution. which will give you a variety of constructors:

  • path and filename
  • year, day and filename

Filename is defaulted as input.txt

  • path and AoCFileType
  • year, day and AoCFileType

AoCFileType is default at AoCFileType.Input the alternative is AoCFileType.Test

And then two abstract methods for Part1 and Part2

When using the path you can specify an absolute and a relative path, be sure you can access the files.

when using the year,day constructor the library expects the files to be in a relative path. Is common use in the AdventOfCode community to use folders like 2022/01,2022/02 etc, so one folder for the year and a subfolder for the day your working on.

For example if you create a test library to execute the AdventOfCode challenges the folder must be in the root of that project. Similar to this example.

By the way C# works it will not copy the files when building the project, be sure you go to the properties and copy them.

File Names

It is standardized the usage of input.txt and test.txt for the files doing the challenge. In this library we keep them, but you can change them on the constructor.

Contributions

Any idea to improve the functionality is welcome

Give the project a star ⭐

If you like the project, don't hesitate to give it a star or economically support it by donating a coffee

Disclaimer: This library was created totally for the craic; I didn't even stop to think about performance.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  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.
  • net7.0

    • No dependencies.

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
0.1.0 253 12/21/2022