Skip to content

Commit f0d0ead

Browse files
authored
Update Build to allow for Net 9.0 (#961)
* Update Build to allow for Net 9.0 * Update Tests to Suppress NotImplementedException's
1 parent 5b0a911 commit f0d0ead

File tree

8 files changed

+10
-7
lines changed

8 files changed

+10
-7
lines changed

.github/workflows/ci-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ jobs:
2121
fetch-depth: 0
2222
lfs: true
2323

24-
- name: Setup .NET 6/7
24+
- name: Setup .NET 6/7/8/9
2525
uses: actions/setup-dotnet@v4
2626
with:
2727
dotnet-version: |
2828
6.0.x
2929
7.0.x
3030
8.0.x
31+
9.0.x
3132
3233
- name: NBGV
3334
id: nbgv

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ jobs:
2222
with:
2323
fetch-depth: 0
2424

25-
- name: Setup .NET 6/7
25+
- name: Setup .NET 6/7/8/9
2626
uses: actions/setup-dotnet@v4
2727
with:
2828
dotnet-version: |
2929
6.0.x
3030
7.0.x
3131
8.0.x
32+
9.0.x
3233
3334
- name: NBGV
3435
id: nbgv

NonProduction/DynamicData.Profile/DynamicData.Profile.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22
<PropertyGroup>
3-
<TargetFrameworks>net6.0</TargetFrameworks>
3+
<TargetFrameworks>net8.0</TargetFrameworks>
44
<NoWarn>$(NoWarn);CS0618</NoWarn>
55
</PropertyGroup>
66

src/DynamicData.Tests/Cache/EditDiffChangeSetOptionalFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ private class PersonComparer : IEqualityComparer<Person>
190190
{
191191
public bool Equals([DisallowNull] Person x, [DisallowNull] Person y) =>
192192
EqualityComparer<string>.Default.Equals(x.Name, y.Name) && EqualityComparer<int>.Default.Equals(x.Id, y.Id);
193+
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
193194
public int GetHashCode([DisallowNull] Person obj) => throw new NotImplementedException();
194195
}
195196

src/DynamicData.Tests/Cache/ToObservableOptionalFixture.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ private class KeyValueCompare(IEqualityComparer<string> stringComparer) : IEqual
291291
private IEqualityComparer<string> _stringComparer = stringComparer;
292292

293293
public bool Equals([DisallowNull] KeyValuePair x, [DisallowNull] KeyValuePair y) => _stringComparer.Equals(x.Value, y.Value);
294+
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
294295
public int GetHashCode([DisallowNull] KeyValuePair obj) => throw new NotImplementedException();
295296
}
296297

src/DynamicData.Tests/Domain/MarketPrice.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public decimal Price
5656
private class CurrentPriceEqualityComparer : IEqualityComparer<MarketPrice>
5757
{
5858
public virtual bool Equals([DisallowNull] MarketPrice x, [DisallowNull] MarketPrice y) => x.MarketId.Equals(x.MarketId) && x.ItemId == y.ItemId && x.Price == y.Price;
59+
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
5960
public int GetHashCode([DisallowNull] MarketPrice obj) => throw new NotImplementedException();
6061
}
6162

src/DynamicData.Tests/Utilities/ComparerExtensions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ internal sealed class NoOpComparer<T> : IComparer<T>
1111

1212
internal sealed class NoOpEqualityComparer<T> : IEqualityComparer<T>
1313
{
14+
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
1415
public bool Equals(T x, T y) => throw new NotImplementedException();
16+
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
1517
public int GetHashCode([DisallowNull] T obj) => throw new NotImplementedException();
1618
}
1719

src/global.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
{
2-
"sdk": {
3-
"version": "8.0.401",
4-
"rollForward": "latestMinor"
5-
},
62
"msbuild-sdks": {
73
"MSBuild.Sdk.Extras": "3.0.44"
84
}

0 commit comments

Comments
 (0)