Skip to content

Commit f7cc21c

Browse files
authored
Merge pull request #16 from Zaneris/2.4.3
2.4.3 - .NET 9
2 parents 6ca801e + 4c0e410 commit f7cc21c

7 files changed

Lines changed: 35 additions & 31 deletions

File tree

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
@@ -13,18 +13,18 @@
1313
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1414
<PackageReadmeFile>README.md</PackageReadmeFile>
1515
<GenerateDocumentationFile>true</GenerateDocumentationFile>
16-
<PackageVersion>2.4.2</PackageVersion>
16+
<PackageVersion>2.4.3</PackageVersion>
1717
<PackageReleaseNotes>
18-
- Inputs now download to correct directory when running from terminal
18+
- .NET 9
1919
</PackageReleaseNotes>
2020
<PackageTags>aoc;adventofcode;advent;code;benchmark;benchmarkdotnet;chatgpt;gpt;</PackageTags>
2121
</PropertyGroup>
2222

2323
<ItemGroup>
24-
<PackageReference Include="BenchmarkDotNet" Version="0.13.11" />
24+
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
2525
<None Include="..\README.md" Pack="true" PackagePath="\" />
26-
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.2.2" />
27-
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
26+
<PackageReference Include="CommunityToolkit.HighPerformance" Version="8.3.2" />
27+
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="9.0.0" />
2828
</ItemGroup>
2929

3030
</Project>

AltNamingTests/AltNamingTests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

@@ -10,13 +10,13 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
14-
<PackageReference Include="xunit" Version="2.4.2"/>
15-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
14+
<PackageReference Include="xunit" Version="2.9.2" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
1616
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
1717
<PrivateAssets>all</PrivateAssets>
1818
</PackageReference>
19-
<PackageReference Include="coverlet.collector" Version="6.0.0">
19+
<PackageReference Include="coverlet.collector" Version="6.0.2">
2020
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2121
<PrivateAssets>all</PrivateAssets>
2222
</PackageReference>

PackageTests/2022/Inputs/04.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
 Test
1+
Test
22
Test2
33

44
Block2

PackageTests/2022/Inputs/06.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Test
2+
Test2
3+
4+
Block2

PackageTests/PackageTests.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
@@ -16,13 +16,13 @@
1616
</PropertyGroup>
1717

1818
<ItemGroup>
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
20-
<PackageReference Include="xunit" Version="2.6.2" />
21-
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
19+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
20+
<PackageReference Include="xunit" Version="2.9.2" />
21+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
2222
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2323
<PrivateAssets>all</PrivateAssets>
2424
</PackageReference>
25-
<PackageReference Include="coverlet.collector" Version="6.0.0">
25+
<PackageReference Include="coverlet.collector" Version="6.0.2">
2626
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
2727
<PrivateAssets>all</PrivateAssets>
2828
</PackageReference>

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ puzzle within a single solution. Each day is automatically registered to a
44
central location, with built-in support for BenchmarkDotNet, downloading input files, and submitting answers.
55
## Quick Start
66
* Begin by adding this NuGet package to your project `AdventOfCodeSupport`.
7-
* Add a folder to your project for the current year i.e. `2023`.
7+
* Add a folder to your project for the current year i.e. `2024`.
88
* Add a subfolder to the year called `Inputs`.
99
* Place each day's input into that folder named by day with 2 digits `01.txt`.
10-
* Create a class in the `2023` folder called `Day01.cs`
10+
* Create a class in the `2024` folder called `Day01.cs`
1111
```text
1212
Project/
1313
├── Program.cs
14-
└── 2023/
14+
└── 2024/
1515
├── Day01.cs
1616
├── Day02.cs
1717
└── Inputs/
@@ -21,7 +21,7 @@ Project/
2121
```csharp
2222
using AdventOfCodeSupport;
2323

24-
namespace Foo._2023;
24+
namespace Foo._2024;
2525

2626
public class Day01 : AdventBase
2727
{
@@ -65,8 +65,8 @@ using AdventOfCodeSupport;
6565

6666
var solutions = new AdventSolutions();
6767
var today = solutions.GetMostRecentDay();
68-
// var day3 = solutions.GetDay(2023, 3);
69-
// var day4 = solutions.First(x => x.Year == 2023 && x.Day == 4);
68+
// var day3 = solutions.GetDay(2024, 3);
69+
// var day4 = solutions.First(x => x.Year == 2024 && x.Day == 4);
7070
today.Part1().Part2();
7171
// today.Benchmark();
7272
```
@@ -79,20 +79,20 @@ the structure show below.
7979
```text
8080
Project/
8181
├── Program.cs
82-
├── Year2023Day01.cs
83-
├── Year2023Day02.cs
82+
├── Year2024Day01.cs
83+
├── Year2024Day02.cs
8484
└── Inputs/
85-
├── 202301.txt
86-
└── 202302.txt
85+
├── 202401.txt
86+
└── 202402.txt
8787
```
8888
You would instantiate your `AdventSolutions` as follows:
8989
```csharp
9090
using AdventOfCodeSupport;
9191

9292
var solutions = new AdventSolutions("Inputs/yyyydd.txt", "YearyyyyDaydd.cs");
9393
var today = solutions.GetMostRecentDay();
94-
// var day3 = solutions.GetDay(2023, 3);
95-
// var day4 = solutions.First(x => x.Year == 2023 && x.Day == 4);
94+
// var day3 = solutions.GetDay(2024, 3);
95+
// var day4 = solutions.First(x => x.Year == 2024 && x.Day == 4);
9696
today.Part1().Part2();
9797
// today.Benchmark();
9898
```
@@ -195,7 +195,7 @@ public class SampleTests
195195
[Fact]
196196
public void InputTest_CustomInput_TextLoaded()
197197
{
198-
var day = _solutions.GetDay(2023, 4);
198+
var day = _solutions.GetDay(2024, 4);
199199
day.SetTestInput("123");
200200
Assert.Equal("42", day.Part1Answer);
201201
Assert.StartsWith("123", day.GetBag()["Test"]);

SampleProject/SampleProject.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net8.0</TargetFramework>
5+
<TargetFramework>net9.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
88
<UserSecretsId>5c684afe-6a68-4ef3-9f10-8b161f8895c2</UserSecretsId>

0 commit comments

Comments
 (0)