Skip to content

Commit b13c36e

Browse files
committed
🚀 Upgrade to .NET 8.0
1 parent cf42387 commit b13c36e

File tree

18 files changed

+61
-78
lines changed

18 files changed

+61
-78
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [workflow_dispatch]
44

55
env:
66
WEBAPP_PACKAGE_PATH: './published'
7-
NETCORE_VERSION: '6.0.202'
7+
NETCORE_VERSION: '8.0.0'
88
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
99

1010
jobs:

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"type": "coreclr",
1010
"request": "launch",
1111
"preLaunchTask": "watch",
12-
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net6.0/DDD.Services.Api.dll",
12+
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net8.0/DDD.Services.Api.dll",
1313
"args": [],
1414
"cwd": "${workspaceFolder}/Src/DDD.Services.Api",
1515
"stopAtEntry": false,
@@ -24,7 +24,7 @@
2424
"type": "coreclr",
2525
"request": "launch",
2626
"preLaunchTask": "build",
27-
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net6.0/DDD.Services.Api.dll",
27+
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net8.0/DDD.Services.Api.dll",
2828
"args": [],
2929
"cwd": "${workspaceFolder}/Src/DDD.Services.Api",
3030
"stopAtEntry": false,
@@ -39,7 +39,7 @@
3939
"type": "coreclr",
4040
"request": "launch",
4141
"preLaunchTask": "build",
42-
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net6.0/DDD.Services.Api.dll",
42+
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net8.0/DDD.Services.Api.dll",
4343
"args": [],
4444
"cwd": "${workspaceFolder}/Src/DDD.Services.Api",
4545
"stopAtEntry": false,
@@ -54,7 +54,7 @@
5454
"type": "coreclr",
5555
"request": "launch",
5656
"preLaunchTask": "build",
57-
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net6.0/DDD.Services.Api.dll",
57+
"program": "${workspaceFolder}/Src/DDD.Services.Api/bin/Debug/net8.0/DDD.Services.Api.dll",
5858
"args": [],
5959
"cwd": "${workspaceFolder}/Src/DDD.Services.Api",
6060
"stopAtEntry": false,

Containerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# .NET Core SDK
2-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
33

44
# Sets the working directory
55
WORKDIR /app
@@ -25,7 +25,7 @@ COPY Src ./Src
2525
RUN dotnet publish ./Src/DDD.Services.Api/DDD.Services.Api.csproj -c Release -o /publish
2626

2727
# ASP.NET Core Runtime
28-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
28+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
2929
WORKDIR /app
3030
COPY --from=build /publish ./
3131

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# .NET Core SDK
2-
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
33

44
# Sets the working directory
55
WORKDIR /app
@@ -25,7 +25,7 @@ COPY Src ./Src
2525
RUN dotnet publish ./Src/DDD.Services.Api/DDD.Services.Api.csproj -c Release -o /publish
2626

2727
# ASP.NET Core Runtime
28-
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS runtime
28+
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
2929
WORKDIR /app
3030
COPY --from=build /publish ./
3131

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
![](/Docs/custom-repo-versus-db-context.png)
2121

2222
# Techical Stack
23-
- ASP.NET Core 6.0 (with .NET 6.0)
23+
- ASP.NET Core 8.0 (with .NET 8.0)
2424
- ASP.NET WebApi Core
2525
- ASP.NET Identity Core
2626
- Entity Framework Core
@@ -52,7 +52,12 @@
5252
- Options Pattern
5353

5454
# How to run
55-
- Create file `C:\Users\[UserName]\AppData\Roaming\Microsoft\UserSecrets\51c0770a-8c88-4362-b3b5-a8936796ecef\secrets.json`
55+
56+
- Config User Secret:
57+
+ Find `<user_secrets_id>` at `DDD.Services.Api.csproj` > `UserSecretsId` (Free to change to any GUID/UUID)
58+
+ Windows: `C:\Users\[UserName]\AppData\Roaming\Microsoft\UserSecrets\<user_secrets_id>\secrets.json`
59+
+ Linux / macOS: `~/.microsoft/usersecrets/<user_secrets_id>/secrets.json`
60+
5661

5762
```json
5863
{
@@ -140,7 +145,7 @@ podman-compose stop
140145
- [x] Database Auditing: CreatedAt/UpdatedAt CreatedBy/UpdatedBy
141146
- [x] Soft Delete
142147
- [x] Common: Constants, Helpers
143-
- [x] Docker
148+
- [x] Docker, Docker Compose, Github Container Registry
144149
- [x] EF: Shadow Properties
145150
- [x] Events
146151
- [x] Unit Testing

Src/DDD.Application/DDD.Application.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>DDD.Application</RootNamespace>
66
<AssemblyName>DDD.Application</AssemblyName>
77
<AnalysisLevel>5</AnalysisLevel>

Src/DDD.CLI.Migration/DDD.CLI.Migration.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>net6.0</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="dbup" Version="4.6.0" />
10-
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.0" />
10+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

Src/DDD.CLI.Migration/packages.lock.json

Lines changed: 19 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"version": 1,
33
"dependencies": {
4-
"net6.0": {
4+
"net8.0": {
55
"dbup": {
66
"type": "Direct",
77
"requested": "[4.6.0, )",
@@ -13,12 +13,12 @@
1313
},
1414
"System.Configuration.ConfigurationManager": {
1515
"type": "Direct",
16-
"requested": "[6.0.0, )",
17-
"resolved": "6.0.0",
18-
"contentHash": "7T+m0kDSlIPTHIkPMIu6m6tV6qsMqJpvQWW2jIc2qi7sn40qxFo0q+7mEQAhMPXZHMKnWrnv47ntGlM/ejvw3g==",
16+
"requested": "[8.0.0, )",
17+
"resolved": "8.0.0",
18+
"contentHash": "JlYi9XVvIREURRUlGMr1F6vOFLk7YSY4p1vHo4kX3tQ0AGrjqlRWHDi66ImHhy6qwXBG3BJ6Y1QlYQ+Qz6Xgww==",
1919
"dependencies": {
20-
"System.Security.Cryptography.ProtectedData": "6.0.0",
21-
"System.Security.Permissions": "6.0.0"
20+
"System.Diagnostics.EventLog": "8.0.0",
21+
"System.Security.Cryptography.ProtectedData": "8.0.0"
2222
}
2323
},
2424
"dbup-core": {
@@ -96,11 +96,6 @@
9696
"System.Security.Principal.Windows": "4.5.0"
9797
}
9898
},
99-
"Microsoft.Win32.SystemEvents": {
100-
"type": "Transitive",
101-
"resolved": "6.0.0",
102-
"contentHash": "hqTM5628jSsQiv+HGpiq3WKBl2c8v1KZfby2J6Pr7pEPlK9waPdgEO6b8A/+/xn/yZ9ulv8HuqK71ONy2tg67A=="
103-
},
10499
"NETStandard.Library": {
105100
"type": "Transitive",
106101
"resolved": "1.6.1",
@@ -376,6 +371,11 @@
376371
"System.Threading": "4.3.0"
377372
}
378373
},
374+
"System.Diagnostics.EventLog": {
375+
"type": "Transitive",
376+
"resolved": "8.0.0",
377+
"contentHash": "fdYxcRjQqTTacKId/2IECojlDSFvp7LP5N78+0z/xH7v/Tuw5ZAxu23Y6PTCRinqyu2ePx+Gn1098NC6jM6d+A=="
378+
},
379379
"System.Diagnostics.Process": {
380380
"type": "Transitive",
381381
"resolved": "4.3.0",
@@ -440,14 +440,6 @@
440440
"System.Runtime": "4.3.0"
441441
}
442442
},
443-
"System.Drawing.Common": {
444-
"type": "Transitive",
445-
"resolved": "6.0.0",
446-
"contentHash": "NfuoKUiP2nUWwKZN6twGqXioIe1zVD0RIj2t976A+czLHr2nY454RwwXs6JU9Htc6mwqL6Dn/nEL3dpVf2jOhg==",
447-
"dependencies": {
448-
"Microsoft.Win32.SystemEvents": "6.0.0"
449-
}
450-
},
451443
"System.Globalization": {
452444
"type": "Transitive",
453445
"resolved": "4.3.0",
@@ -872,8 +864,12 @@
872864
},
873865
"System.Security.AccessControl": {
874866
"type": "Transitive",
875-
"resolved": "6.0.0",
876-
"contentHash": "AUADIc0LIEQe7MzC+I0cl0rAT8RrTAKFHl53yHjEUzNVIaUlhFY11vc2ebiVJzVBuOzun6F7FBA+8KAbGTTedQ=="
867+
"resolved": "4.5.0",
868+
"contentHash": "vW8Eoq0TMyz5vAG/6ce483x/CP83fgm4SJe5P8Tb1tZaobcvPrbMEL7rhH1DRdrYbbb6F0vq3OlzmK0Pkwks5A==",
869+
"dependencies": {
870+
"Microsoft.NETCore.Platforms": "2.0.0",
871+
"System.Security.Principal.Windows": "4.5.0"
872+
}
877873
},
878874
"System.Security.Cryptography.Algorithms": {
879875
"type": "Transitive",
@@ -989,8 +985,8 @@
989985
},
990986
"System.Security.Cryptography.ProtectedData": {
991987
"type": "Transitive",
992-
"resolved": "6.0.0",
993-
"contentHash": "rp1gMNEZpvx9vP0JW0oHLxlf8oSiQgtno77Y4PLUBjSiDYoD77Y8uXHr1Ea5XG4/pIKhqAdxZ8v8OTUtqo9PeQ=="
988+
"resolved": "8.0.0",
989+
"contentHash": "+TUFINV2q2ifyXauQXRwy4CiBhqvDEDZeVJU7qfxya4aRYOKzVBpN+4acx25VcPB9ywUN6C0n8drWl110PhZEg=="
994990
},
995991
"System.Security.Cryptography.X509Certificates": {
996992
"type": "Transitive",
@@ -1024,15 +1020,6 @@
10241020
"runtime.native.System.Security.Cryptography.OpenSsl": "4.3.0"
10251021
}
10261022
},
1027-
"System.Security.Permissions": {
1028-
"type": "Transitive",
1029-
"resolved": "6.0.0",
1030-
"contentHash": "T/uuc7AklkDoxmcJ7LGkyX1CcSviZuLCa4jg3PekfJ7SU0niF0IVTXwUiNVP9DSpzou2PpxJ+eNY2IfDM90ZCg==",
1031-
"dependencies": {
1032-
"System.Security.AccessControl": "6.0.0",
1033-
"System.Windows.Extensions": "6.0.0"
1034-
}
1035-
},
10361023
"System.Security.Principal.Windows": {
10371024
"type": "Transitive",
10381025
"resolved": "4.5.0",
@@ -1150,14 +1137,6 @@
11501137
"System.Runtime": "4.3.0"
11511138
}
11521139
},
1153-
"System.Windows.Extensions": {
1154-
"type": "Transitive",
1155-
"resolved": "6.0.0",
1156-
"contentHash": "IXoJOXIqc39AIe+CIR7koBtRGMiCt/LPM3lI+PELtDIy9XdyeSrwXFdWV9dzJ2Awl0paLWUaknLxFQ5HpHZUog==",
1157-
"dependencies": {
1158-
"System.Drawing.Common": "6.0.0"
1159-
}
1160-
},
11611140
"System.Xml.ReaderWriter": {
11621141
"type": "Transitive",
11631142
"resolved": "4.3.0",

Src/DDD.Domain.Core/DDD.Domain.Core.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>DDD.Domain.Core</RootNamespace>
66
<AssemblyName>DDD.Domain.Core</AssemblyName>
77
<AnalysisLevel>5</AnalysisLevel>

Src/DDD.Domain/DDD.Domain.csproj

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

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<RootNamespace>DDD.Domain</RootNamespace>
66
<AssemblyName>DDD.Domain</AssemblyName>
77
<AnalysisLevel>5</AnalysisLevel>

0 commit comments

Comments
 (0)