From 270929948df1b18fec7d5d76f34e30fc60becb1f Mon Sep 17 00:00:00 2001 From: Hermes Agent Date: Wed, 21 Oct 2026 10:41:23 +0200 Subject: [PATCH] Restructured .net solutions Resolved volnerability --- Directory.Build.props | 101 ++++++++ Directory.Packages.props | 115 +++++++++ PostFundManagement.Api/Dockerfile | 8 +- .../PostFundManagement.Api.csproj | 106 +++----- .../PostFundManagement.Application.csproj | 100 +------- .../PostFundManagement.Domain.csproj | 238 ++++++------------ .../PostFundManagement.Infrastructure.csproj | 47 +--- .../PostFundManagement.Tests.csproj | 20 +- PostFundManagement.slnx | 2 + 9 files changed, 357 insertions(+), 380 deletions(-) create mode 100644 Directory.Build.props create mode 100644 Directory.Packages.props diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..7786cc4 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,101 @@ + + + net10.0 + enable + enable + latest + $(NoWarn);1701;1702;MA0048;MA0051;AV0029;AV0030 + + + + + true + $(MSBuildThisFileDirectory)PostFundManagement.snk + $(MSBuildThisFileDirectory)LICENSE + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Directory.Packages.props b/Directory.Packages.props new file mode 100644 index 0000000..b42f02f --- /dev/null +++ b/Directory.Packages.props @@ -0,0 +1,115 @@ + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PostFundManagement.Api/Dockerfile b/PostFundManagement.Api/Dockerfile index 835b34f..d4c99cc 100644 --- a/PostFundManagement.Api/Dockerfile +++ b/PostFundManagement.Api/Dockerfile @@ -8,7 +8,11 @@ EXPOSE 8080 FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build WORKDIR /src -# Copy csproj files for layer caching +# Copy props and csproj files for layer caching +COPY ["Directory.Build.props", "./"] +COPY ["Directory.Packages.props", "./"] +COPY ["PostFundManagement.snk", "./"] +COPY ["LICENSE", "./"] COPY ["PostFundManagement.Api/PostFundManagement.Api.csproj", "PostFundManagement.Api/"] COPY ["PostFundManagement.Application/PostFundManagement.Application.csproj", "PostFundManagement.Application/"] COPY ["PostFundManagement.Domain/PostFundManagement.Domain.csproj", "PostFundManagement.Domain/"] @@ -33,4 +37,4 @@ RUN dotnet publish "PostFundManagement.Api.csproj" -c Release -o /app/publish /p FROM base AS final WORKDIR /app COPY --from=publish /app/publish . -ENTRYPOINT ["dotnet", "PostFundManagement.Api.dll"] \ No newline at end of file +ENTRYPOINT ["dotnet", "PostFundManagement.Api.dll"] diff --git a/PostFundManagement.Api/PostFundManagement.Api.csproj b/PostFundManagement.Api/PostFundManagement.Api.csproj index ef0be7e..3098cb4 100644 --- a/PostFundManagement.Api/PostFundManagement.Api.csproj +++ b/PostFundManagement.Api/PostFundManagement.Api.csproj @@ -1,111 +1,63 @@ - + - net10.0 - enable - enable 59a05094-4ac2-472d-af04-3407e909432d - ..\PostFundManagement.snk - True - ..\LICENSE - - 1701;1702;AV0029;AV0030; - - - - 1701;1702;AV0029;AV0030; - - - + - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - + + + + + - - - - - - - + + + + - - - - - - - + + + - + - + - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - - + - - - - + + - - - - - - + + diff --git a/PostFundManagement.Application/PostFundManagement.Application.csproj b/PostFundManagement.Application/PostFundManagement.Application.csproj index 96108ea..c674f3c 100644 --- a/PostFundManagement.Application/PostFundManagement.Application.csproj +++ b/PostFundManagement.Application/PostFundManagement.Application.csproj @@ -1,105 +1,29 @@ - - - - net10.0 - enable - enable - ..\PostFundManagement.snk - True - ..\LICENSE - - - - 1701;1702;AV0029;AV0030; - - - - 1701;1702;AV0029;AV0030; - + - + - - - - - - - - - - + + + + + + - + - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/PostFundManagement.Domain/PostFundManagement.Domain.csproj b/PostFundManagement.Domain/PostFundManagement.Domain.csproj index 80faa44..8e3861b 100644 --- a/PostFundManagement.Domain/PostFundManagement.Domain.csproj +++ b/PostFundManagement.Domain/PostFundManagement.Domain.csproj @@ -1,141 +1,97 @@ - - - - net10.0 - enable - enable - ..\PostFundManagement.snk - True - ..\LICENSE - - - - 1701;1702;MA0048;MA0051 - - - - 1701;1702;MA0048;MA0051 - + - - - - - - - - + + + + + + - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - + - - - + - - - - - - + + + + - - - - - - + + - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - - - + + + + + + + - - - - - - - - + + + + + - - - - - - - - - - - - + + + + + + + + - - - - - - + + + + + + - + @@ -145,90 +101,40 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - + - - - - + - - - - - - + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff --git a/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj b/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj index 6451b3a..b10afa1 100644 --- a/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj +++ b/PostFundManagement.Infrastructure/PostFundManagement.Infrastructure.csproj @@ -1,56 +1,35 @@ - + - net10.0 - enable - enable c4131f8d-ff78-432e-86d2-f6e131bd4cd3 - ..\PostFundManagement.snk - True - ..\LICENSE - - - - - + + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - - - - - - - - - - - - + - - - + + + - - - + - - diff --git a/PostFundManagement.Tests/PostFundManagement.Tests.csproj b/PostFundManagement.Tests/PostFundManagement.Tests.csproj index 7e7e4ae..ad5d1ae 100644 --- a/PostFundManagement.Tests/PostFundManagement.Tests.csproj +++ b/PostFundManagement.Tests/PostFundManagement.Tests.csproj @@ -1,9 +1,6 @@ - + - net10.0 - enable - enable false 079fcde1-9b10-4402-9624-5f0827b4dbfd @@ -17,18 +14,15 @@ - - - - + + + + + - - - - @@ -37,4 +31,4 @@ - \ No newline at end of file + diff --git a/PostFundManagement.slnx b/PostFundManagement.slnx index 169329b..c87187f 100644 --- a/PostFundManagement.slnx +++ b/PostFundManagement.slnx @@ -2,6 +2,8 @@ + +