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

Upgrade to .net 9.x #95

Merged
merged 2 commits into from
Dec 10, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

strategy:
matrix:
dotnet-major-version: [8]
dotnet-major-version: [9]
dotnet-minor-version: [0]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
dotnet-major-version: [8]
dotnet-major-version: [9]
dotnet-minor-version: [0]

steps:
Expand Down
18 changes: 9 additions & 9 deletions api/api.csproj
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Scv.Api</RootNamespace>
<UserSecretsId>de959767-ede6-4f8a-b6b9-d36aed703396</UserSecretsId>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DocumentationFile>bin\$(Configuration)\net8.0\api.xml</DocumentationFile>
<DocumentationFile>bin\$(Configuration)\net9.0\api.xml</DocumentationFile>
<NoWarn>1701;1702;1591</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>bin\$(Configuration)\net8.0\api.xml</DocumentationFile>
<DocumentationFile>bin\$(Configuration)\net9.0\api.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="ColeSoft.Extensions.Logging.Splunk" Version="1.0.72" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageReference Include="NSwag.Generation.AspNetCore" Version="14.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.1" />
<PackageReference Include="IdentityModel" Version="6.2.0" />
<PackageReference Include="Mapster" Version="7.4.0" />
<PackageReference Include="LazyCache" Version="2.4.0" />
<PackageReference Include="LazyCache.AspNetCore" Version="2.4.0" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.12" />
<PackageReference Include="Microsoft.OpenApi" Version="1.6.22" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Newtonsoft" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="7.1.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
</ItemGroup>
Expand All @@ -40,4 +40,4 @@
<ItemGroup>
<Folder Include="Services\EF\" />
</ItemGroup>
</Project>
</Project>
8 changes: 4 additions & 4 deletions db/db.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Scv.Db</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Configuration\" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion docker/api/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:8.0
FROM mcr.microsoft.com/dotnet/sdk:9.0

ENV ASPNETCORE_ENVIRONMENT='Production'
ENV ASPNETCORE_URLS='http://+:5000'
Expand Down
4 changes: 2 additions & 2 deletions docker/api/Dockerfile.release
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile used by Github Action
ARG dotnet_version=8.0
ARG dotnet_version=9.0
FROM mcr.microsoft.com/dotnet/aspnet:${dotnet_version} AS base
WORKDIR /app
EXPOSE 8080
Expand Down Expand Up @@ -32,4 +32,4 @@ FROM base AS final
# copy app
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "api.dll"]
ENTRYPOINT ["dotnet", "api.dll"]
14 changes: 7 additions & 7 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: "3.4"
version: '3.4'
services:
web:
image: "${COMPOSE_PROJECT_NAME}-web"
image: '${COMPOSE_PROJECT_NAME}-web'
environment:
- API_URL=${API_URL}
- USE_SELF_SIGNED_SSL=${USE_SELF_SIGNED_SSL}
Expand All @@ -15,7 +15,7 @@ services:
- api

web-dev:
image: "${COMPOSE_PROJECT_NAME}-web-dev"
image: '${COMPOSE_PROJECT_NAME}-web-dev'
environment:
- API_URL=${API_URL}
- WEB_BASE_HREF=${WEB_BASE_HREF}
Expand All @@ -25,15 +25,15 @@ services:
- VITE_PORT=1339
- CHOKIDAR_USEPOLLING=true
ports:
- "8080:1339"
- '8080:1339'
volumes:
- "${LOCAL_WORKSPACE_FOLDER-..}/web/src:/opt/app-root/src/src"
- "${LOCAL_WORKSPACE_FOLDER-..}/web/package.json:/opt/app-root/src/package.json"
- '${LOCAL_WORKSPACE_FOLDER-..}/web/src:/opt/app-root/src/src'
- '${LOCAL_WORKSPACE_FOLDER-..}/web/package.json:/opt/app-root/src/package.json'
depends_on:
- api

api:
image: "${COMPOSE_PROJECT_NAME}-api"
image: '${COMPOSE_PROJECT_NAME}-api'
environment:
- ASPNETCORE_URLS=${ASPNETCORE_URLS}
- FileServicesClient__Username=${FileServicesClientUsername}
Expand Down
2 changes: 1 addition & 1 deletion docker/manage
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ build-api() {
echo -e "----------------------------------------------------------------------------------------------------"
docker build \
-t "${COMPOSE_PROJECT_NAME}-api" \
-f './api//Dockerfile.dev' '..'
-f './api/Dockerfile.dev' '..'

echo -e "===================================================================================================="
}
Expand Down
4 changes: 2 additions & 2 deletions jc-interface-client/jc-interface-client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>JCCommon</RootNamespace>
</PropertyGroup>

Expand All @@ -17,7 +17,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="NSwag.AspNetCore" Version="13.15.10" />
<PackageReference Include="NSwag.AspNetCore" Version="14.2.0" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion pcss-client/pcss-client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>pcss_client</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
6 changes: 3 additions & 3 deletions tests/tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>de959767-ede6-4f8a-b6b9-d36aed703396</UserSecretsId>
</PropertyGroup>
<ItemGroup>
Expand All @@ -13,7 +13,7 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="Moq" Version="4.14.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand All @@ -25,4 +25,4 @@
<ItemGroup>
<Folder Include="api\Services\" />
</ItemGroup>
</Project>
</Project>
Loading