Skip to content

Commit d80c03e

Browse files
authored
Merge pull request #346 from MADE-Apps/dotnet-upgrade
Upgrade to support .NET 7 & 8
2 parents 1201b97 + b135684 commit d80c03e

File tree

24 files changed

+137
-170
lines changed

24 files changed

+137
-170
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,20 @@ jobs:
4545
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
4646
shell: pwsh
4747

48-
- name: Setup .NET 5.0
48+
- name: Setup .NET 6.0
4949
uses: actions/setup-dotnet@v1
5050
with:
51-
dotnet-version: 5.0.x
51+
dotnet-version: 6.0.x
5252

53-
- name: Setup .NET 6.0
53+
- name: Setup .NET 7.0
5454
uses: actions/setup-dotnet@v1
5555
with:
56-
dotnet-version: 6.0.x
56+
dotnet-version: 7.0.x
57+
58+
- name: Setup .NET 8.0
59+
uses: actions/setup-dotnet@v1
60+
with:
61+
dotnet-version: 8.0.x
5762

5863
- name: Restore dependencies
5964
run: dotnet restore $SOLUTION

.github/workflows/docs.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ jobs:
2929
with:
3030
dotnet-version: 6.0.x
3131

32+
- name: Setup .NET 7.0
33+
uses: actions/setup-dotnet@v1
34+
with:
35+
dotnet-version: 7.0.x
36+
37+
- name: Setup .NET 8.0
38+
uses: actions/setup-dotnet@v1
39+
with:
40+
dotnet-version: 8.0.x
41+
3242
- name: Setup MSBuild
3343
uses: microsoft/[email protected]
3444

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
</ItemGroup>
3131

3232
<ItemGroup>
33-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
33+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
3434
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
3535
</ItemGroup>
3636

src/MADE.Data.Converters/MADE.Data.Converters.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;uap10.0.17763</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;uap10.0.19041</TargetFrameworks>
55
<Product>MADE.NET Data Converters</Product>
66
<Description>
77
MADE.NET Data Converters provide out-of-the-box value converters for taking values of one type and changing them to another.
Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,27 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
55
<Product>MADE.NET for EF Core</Product>
66
<Description>
77
MADE.NET for EF Core builds on the base Entity Framework library to provide base classes and helpers for maintaining data in databases.
88
</Description>
99
<PackageTags>MADE EFCore Entity Framework Extensions Queryable DbContext</PackageTags>
1010
</PropertyGroup>
1111

12-
<ItemGroup>
13-
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.10" />
14-
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.15.2" />
12+
<ItemGroup Condition="'$(TargetFramework)'=='net6.0'">
13+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.25" />
14+
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="6.101.1.3" />
15+
</ItemGroup>
16+
17+
<ItemGroup Condition="'$(TargetFramework)'=='net7.0'">
18+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.14" />
19+
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="7.101.1.3" />
20+
</ItemGroup>
21+
22+
<ItemGroup Condition="'$(TargetFramework)'=='net8.0'">
23+
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
24+
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="8.101.1.3" />
1525
</ItemGroup>
1626

1727
</Project>

src/MADE.Data.Serialization/MADE.Data.Serialization.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
13+
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
1414
</ItemGroup>
1515

1616
</Project>

src/MADE.Data.Validation.FluentValidation/MADE.Data.Validation.FluentValidation.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="FluentValidation" Version="11.5.2" />
15+
<PackageReference Include="FluentValidation" Version="11.9.0" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/MADE.Diagnostics/AppDiagnostics.cs

Lines changed: 3 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ namespace MADE.Diagnostics
1414
/// </summary>
1515
public class AppDiagnostics : IAppDiagnostics
1616
{
17-
#if __ANDROID__
18-
private UncaughtExceptionHandler javaExceptionHandler;
19-
#endif
20-
2117
/// <summary>
2218
/// Initializes a new instance of the <see cref="AppDiagnostics"/> class.
2319
/// </summary>
@@ -63,17 +59,9 @@ public async Task StartRecordingDiagnosticsAsync()
6359

6460
#if WINDOWS_UWP
6561
Windows.UI.Xaml.Application.Current.UnhandledException += this.OnAppUnhandledException;
66-
#elif NETSTANDARD2_0 || __ANDROID__ || __IOS__
62+
#elif NETSTANDARD2_0
6763
AppDomain.CurrentDomain.UnhandledException += this.OnAppUnhandledException;
6864
#endif
69-
70-
#if __ANDROID__
71-
Android.Runtime.AndroidEnvironment.UnhandledExceptionRaiser += this.OnAndroidAppUnhandledException;
72-
73-
this.javaExceptionHandler = new UncaughtExceptionHandler(this.OnJavaUncaughtException);
74-
Java.Lang.Thread.DefaultUncaughtExceptionHandler = this.javaExceptionHandler;
75-
#endif
76-
7765
TaskScheduler.UnobservedTaskException += this.OnTaskUnobservedException;
7866

7967
await Task.CompletedTask;
@@ -91,14 +79,9 @@ public void StopRecordingDiagnostics()
9179

9280
#if WINDOWS_UWP
9381
Windows.UI.Xaml.Application.Current.UnhandledException -= this.OnAppUnhandledException;
94-
#elif NETSTANDARD2_0 || __ANDROID__ || __IOS__
82+
#elif NETSTANDARD2_0
9583
AppDomain.CurrentDomain.UnhandledException -= this.OnAppUnhandledException;
9684
#endif
97-
98-
#if __ANDROID__
99-
Android.Runtime.AndroidEnvironment.UnhandledExceptionRaiser -= this.OnAndroidAppUnhandledException;
100-
#endif
101-
10285
TaskScheduler.UnobservedTaskException -= this.OnTaskUnobservedException;
10386

10487
this.IsRecordingDiagnostics = false;
@@ -128,7 +111,7 @@ private void OnAppUnhandledException(object sender, Windows.UI.Xaml.UnhandledExc
128111
? $"An unhandled exception was thrown. Error: {args.Exception}"
129112
: "An unhandled exception was thrown. Error: No exception information was available.");
130113
}
131-
#elif NETSTANDARD2_0 || __ANDROID__ || __IOS__
114+
#elif NETSTANDARD2_0
132115
private void OnAppUnhandledException(object sender, UnhandledExceptionEventArgs args)
133116
{
134117
if (args.IsTerminating)
@@ -149,29 +132,5 @@ private void OnAppUnhandledException(object sender, UnhandledExceptionEventArgs
149132
this.ExceptionObserved?.Invoke(this, new ExceptionObservedEventArgs(correlationId, ex));
150133
}
151134
#endif
152-
153-
#if __ANDROID__
154-
private void OnAndroidAppUnhandledException(object sender, Android.Runtime.RaiseThrowableEventArgs args)
155-
{
156-
args.Handled = true;
157-
158-
var correlationId = Guid.NewGuid();
159-
160-
this.EventLogger.WriteCritical($"An unhandled exception was thrown. Correlation ID: {correlationId}. Error: {args.Exception}.");
161-
this.ExceptionObserved?.Invoke(this, new ExceptionObservedEventArgs(correlationId, args.Exception));
162-
}
163-
164-
private void OnJavaUncaughtException(Exception ex)
165-
{
166-
var correlationId = Guid.NewGuid();
167-
168-
this.EventLogger.WriteCritical(
169-
ex != null
170-
? $"An unhandled exception was thrown. Correlation ID: {correlationId}. Error: {ex}."
171-
: $"An unhandled exception was thrown. Correlation ID: {correlationId}. Error: No exception information was available.");
172-
173-
this.ExceptionObserved?.Invoke(this, new ExceptionObservedEventArgs(correlationId, ex));
174-
}
175-
#endif
176135
}
177136
}

src/MADE.Diagnostics/Exceptions/UncaughtExceptionHandler.Android.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/MADE.Diagnostics/MADE.Diagnostics.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="MSBuild.Sdk.Extras">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;uap10.0.17763;xamarinios10;xamarinmac20;MonoAndroid10.0</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;uap10.0.19041</TargetFrameworks>
55
<Product>MADE.NET Diagnostics</Product>
66
<Description>
77
MADE.NET Diagnostics provides helpers to make debugging and logging results in your applications easier.
88
</Description>
99
<PackageTags>MADE Diagnostics Extensions Logging EventLog Logger Exception Stopwatch</PackageTags>
1010
</PropertyGroup>
1111

12-
<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.17763' Or '$(TargetFramework)'=='xamarinios10' Or '$(TargetFramework)'=='MonoAndroid10.0'">
12+
<ItemGroup Condition="'$(TargetFramework)'=='uap10.0.19041'">
1313
<PackageReference Include="XPlat.Storage" Version="1.8.1" />
1414
</ItemGroup>
1515

0 commit comments

Comments
 (0)