diff --git a/README.md b/README.md index f5ad9bc..426f0ce 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ An example of payload passed into the Azure service bus can be seen below. ### Prerequisites In order to run the service you will need the following dependencies: -- .NET 6 +- .NET 8 - Redis - Azure CLI diff --git a/pipelines/ci_pipeline.yaml b/pipelines/ci_pipeline.yaml index 6757443..a7218c1 100644 --- a/pipelines/ci_pipeline.yaml +++ b/pipelines/ci_pipeline.yaml @@ -42,7 +42,7 @@ resources: name: defra/epr-webapps-code-deploy-templates type: github endpoint: defra - ref: main + ref: upgrade-net-8 extends: template: epr-build-pipeline.yaml@CommonTemplates diff --git a/pipelines/deployment-pipeline.yaml b/pipelines/deployment-pipeline.yaml index c3d91db..9733584 100644 --- a/pipelines/deployment-pipeline.yaml +++ b/pipelines/deployment-pipeline.yaml @@ -62,7 +62,7 @@ resources: name: defra/epr-webapps-code-deploy-templates type: github endpoint: defra - ref: main + ref: upgrade-net-8 # The repo will be reference the repo by a release tag (if the imageTag parameter contains 'release') otherwise it will pull down the main branch. - repository: ReleaseTags diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 30687be..f8e9e8b 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,7 +1,7 @@ - net6.0 + net8.0 true enable enable diff --git a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj index c15d984..9a53f22 100644 --- a/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.Application.UnitTests/EPR.ProducerContentValidation.Application.UnitTests.csproj @@ -1,23 +1,29 @@ - + false true + net8.0 - - - + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - + + + + + + + diff --git a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj index 33bb6da..7e2686e 100644 --- a/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj +++ b/src/EPR.ProducerContentValidation.Application/EPR.ProducerContentValidation.Application.csproj @@ -1,23 +1,24 @@ - + false + net8.0 - - - - - - - - - - - - - + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs b/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs index 321ca98..f861072 100644 --- a/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs +++ b/src/EPR.ProducerContentValidation.Application/Exceptions/MissingSubmissionConfidurationException.cs @@ -1,5 +1,4 @@ using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; namespace EPR.ProducerContentValidation.Application.Exceptions; @@ -11,9 +10,4 @@ public MissingSubmissionConfidurationException(string message) : base(message) { } - - protected MissingSubmissionConfidurationException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } diff --git a/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs b/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs index 1820183..2133f29 100644 --- a/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs +++ b/src/EPR.ProducerContentValidation.Application/Exceptions/SubmissionApiClientException.cs @@ -1,7 +1,6 @@ namespace EPR.ProducerContentValidation.Application.Exceptions; using System.Diagnostics.CodeAnalysis; -using System.Runtime.Serialization; [ExcludeFromCodeCoverage] [Serializable] @@ -11,9 +10,4 @@ public SubmissionApiClientException(string message, Exception cause) : base(message, cause) { } - - protected SubmissionApiClientException(SerializationInfo info, StreamingContext context) - : base(info, context) - { - } } \ No newline at end of file diff --git a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj index 22ca936..1a04807 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp.UnitTests/EPR.ProducerContentValidation.FunctionApp.UnitTests.csproj @@ -1,22 +1,26 @@ - + false true + net8.0 - - + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - - - - + + + + + diff --git a/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile b/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile index 3bdf958..75d2dc2 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile +++ b/src/EPR.ProducerContentValidation.FunctionApp/Dockerfile @@ -1,7 +1,7 @@ -FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS installer-env # Build requires 3.1 SDK -COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet +#COPY --from=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet /usr/share/dotnet # Copy everything COPY stylecop.ruleset ./ @@ -13,7 +13,7 @@ RUN dotnet publish EPR.ProducerContentValidation.FunctionApp/*.csproj --output / # To enable ssh & remote debugging on app service change the base image to the one below # FROM mcr.microsoft.com/azure-functions/dotnet:4-appservice -FROM mcr.microsoft.com/azure-functions/dotnet:4 +FROM mcr.microsoft.com/azure-functions/dotnet:4-dotnet8 # Create a non-root user and set permissions RUN groupadd -r dotnet && \ diff --git a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj index a5a9277..09cae52 100644 --- a/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj +++ b/src/EPR.ProducerContentValidation.FunctionApp/EPR.ProducerContentValidation.FunctionApp.csproj @@ -1,19 +1,22 @@ - + V4 false S3903 + net8.0 + - - - - - - - + + + + + + + + diff --git a/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj b/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj index 5929435..395f9e4 100644 --- a/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj +++ b/src/EPR.ProducerContentValidation.TestSupport/EPR.ProducerContentValidation.TestSupport.csproj @@ -1,9 +1,10 @@ - + - + true + net8.0