Skip to content

Commit

Permalink
Update SDK .NET8 (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
djek-sweng authored Jan 3, 2024
1 parent 3699b35 commit 66a4c8c
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 50 deletions.
4 changes: 2 additions & 2 deletions src/.editorconfig → .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
root = true

# Unix-style newlines with a newline ending every file
[*cs]
[*.cs]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
charset = utf-8

[*{csproj,targets,props,sh}]
[*.{csproj,targets,props,sh}]
end_of_line = lf
insert_final_newline = true
indent_style = space
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: .NET

on:
push:
branches:
- main
- feature/**
pull_request:
branches:
- main
- feature/**
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: |
cd src/
dotnet restore EFCore.TableMapping.sln
- name: Build
run: |
cd src/
dotnet build EFCore.TableMapping.sln --no-restore
- name: Test
run: |
cd src/
dotnet test EFCore.TableMapping.sln --no-build --verbosity normal
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,21 +244,13 @@ http://localhost:5102/swagger
#### **Toolchain Requirements and Versions**

```sh
$ dotnet --info
.NET SDK:
Version: 7.0.306

.NET SDKs installed:
7.0.306

.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.9
Microsoft.NETCore.App 7.0.9
$ dotnet --version
8.0.100

$ dotnet ef --version
Entity Framework Core .NET Command-line Tools
7.0.10
8.0.0

$ sqlite3 --version
3.39.5
3.43.2
```
2 changes: 0 additions & 2 deletions app_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
SLN_FILE="./src/EFCore.TableMapping.sln"

dotnet build "$SLN_FILE"

exit 0
2 changes: 0 additions & 2 deletions app_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
SLN_FILE="./src/EFCore.TableMapping.sln"

dotnet clean "$SLN_FILE"

exit 0
16 changes: 7 additions & 9 deletions app_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,26 @@

if [ $# -eq 0 ]
then
echo "Pass input argument."
exit -1
echo "Pass input argument."
exit -1

elif [ "$1" == "tph" ]
then
CSPORJ="Tph"
CSPORJ="Tph"

elif [ "$1" == "tpt" ]
then
CSPORJ="Tpt"
CSPORJ="Tpt"

elif [ "$1" == "tpc" ]
then
CSPORJ="Tpc"
CSPORJ="Tpc"

else
echo "Invalid input argument."
exit -1
echo "Invalid input argument."
exit -1
fi

CSPORJ_FILE="./src/EFCore.TableMapping.WebApi."$CSPORJ"/EFCore.TableMapping.WebApi."$CSPORJ".csproj"

dotnet run --project "$CSPORJ_FILE" --launch-profile "https"

exit 0
2 changes: 1 addition & 1 deletion src/global.json → global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.306",
"version": "8.0.100",
"rollForward": "latestFeature",
"allowPrerelease": false
}
Expand Down
21 changes: 11 additions & 10 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
<Project>

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11.0</LangVersion>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>

<ItemGroup Label="NuGet.Packages">
<!-- Swagger -->
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.10" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageVersion Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0" />
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<!-- EntityFramework Core -->
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.10" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.10">
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.10">
</PackageVersion>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.10" />
</PackageVersion>
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup Label="NuGet.Packages">
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="[8.0.0, )"/>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="[8.0.0, )"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="[8.0.0, )" />
</ItemGroup>

<Target Name="NetClean" BeforeTargets="Clean">
<Message Text="Deleting directories and files..."/>
<RemoveDir Directories="bin"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup Label="NuGet.Packages">
<PackageReference Include="Swashbuckle.AspNetCore" Version="[6.5.0, )" />
</ItemGroup>

<ItemGroup Label="Project.References">
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

<Target Name="NetClean" BeforeTargets="Clean">
<Message Text="Deleting directories and files..."/>
<RemoveDir Directories="bin"/>
<RemoveDir Directories="obj"/>
<Delete Files="db_tpc.sqlite" />
</Target>

<ItemGroup>
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup Label="NuGet.Packages">
<PackageReference Include="Swashbuckle.AspNetCore" Version="[6.5.0, )" />
</ItemGroup>

<ItemGroup Label="Project.References">
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

<Target Name="NetClean" BeforeTargets="Clean">
<Message Text="Deleting directories and files..."/>
<RemoveDir Directories="bin"/>
<RemoveDir Directories="obj"/>
<Delete Files="db_tph.sqlite" />
</Target>

<ItemGroup>
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<ItemGroup Label="NuGet.Packages">
<PackageReference Include="Swashbuckle.AspNetCore" Version="[6.5.0, )" />
</ItemGroup>

<ItemGroup Label="Project.References">
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

<Target Name="NetClean" BeforeTargets="Clean">
<Message Text="Deleting directories and files..."/>
<RemoveDir Directories="bin"/>
<RemoveDir Directories="obj"/>
<Delete Files="db_tpt.sqlite" />
</Target>

<ItemGroup>
<ProjectReference Include="..\EFCore.TableMapping.Shared\EFCore.TableMapping.Shared.csproj" />
</ItemGroup>

</Project>

0 comments on commit 66a4c8c

Please sign in to comment.