Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Build to allow for Net 9.0 #961

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ jobs:
fetch-depth: 0
lfs: true

- name: Setup .NET 6/7
- name: Setup .NET 6/7/8/9
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x

- name: NBGV
id: nbgv
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET 6/7
- name: Setup .NET 6/7/8/9
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
9.0.x

- name: NBGV
id: nbgv
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="MSBuild.Sdk.Extras">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ private class PersonComparer : IEqualityComparer<Person>
{
public bool Equals([DisallowNull] Person x, [DisallowNull] Person y) =>
EqualityComparer<string>.Default.Equals(x.Name, y.Name) && EqualityComparer<int>.Default.Equals(x.Id, y.Id);
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
public int GetHashCode([DisallowNull] Person obj) => throw new NotImplementedException();
}

Expand Down
1 change: 1 addition & 0 deletions src/DynamicData.Tests/Cache/ToObservableOptionalFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ private class KeyValueCompare(IEqualityComparer<string> stringComparer) : IEqual
private IEqualityComparer<string> _stringComparer = stringComparer;

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

Expand Down
1 change: 1 addition & 0 deletions src/DynamicData.Tests/Domain/MarketPrice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public decimal Price
private class CurrentPriceEqualityComparer : IEqualityComparer<MarketPrice>
{
public virtual bool Equals([DisallowNull] MarketPrice x, [DisallowNull] MarketPrice y) => x.MarketId.Equals(x.MarketId) && x.ItemId == y.ItemId && x.Price == y.Price;
[SuppressMessage("Design", "CA1065:Do not raise exceptions in unexpected locations", Justification = "Suppressed for Net 9.0")]
public int GetHashCode([DisallowNull] MarketPrice obj) => throw new NotImplementedException();
}

Expand Down
2 changes: 2 additions & 0 deletions src/DynamicData.Tests/Utilities/ComparerExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ internal sealed class NoOpComparer<T> : IComparer<T>

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

Expand Down
4 changes: 0 additions & 4 deletions src/global.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"sdk": {
"version": "8.0.401",
"rollForward": "latestMinor"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44"
}
Expand Down
Loading