Overview over breaking changes introduced in App Nuget-packages in v6.0.0.
Altinn.App.* libraries target .Net 6 now, which requires that the application does the same.
In addition, all references to app and platform services have been moved from Startup.cs and should be replaced with two method calls.
Follow the instructions below to ensure that the app is compatible with version 6 of the Altinn.App.* packages.
Update target framework and package dependencies
Install .Net 6 SDK before you start changing code.
Navigate to you application repository and find
Update target framework to .Net 6 by replacing
In the same file, update the Altinn.App.* package references to version 6.0.0.
<PackageReference Include="Altinn.App.Api" Version="6.0.0"> <CopyToOutputDirectory>lib\$(TargetFramework)\*.xml</CopyToOutputDirectory> </PackageReference> <PackageReference Include="Altinn.App.Common" Version="6.0.0" /> <PackageReference Include="Altinn.App.PlatformServices" Version="6.0.0" />
Update Dockerfile to use .Net 6 images
The Dockerfile can be found in the root folder of the application repository.
Update build image by replacing
FROM mcr.microsoft.com/dotnet/sdk:5.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine AS build
And update the runtime image by replacing
FROM mcr.microsoft.com/dotnet/aspnet:5.0-alpine AS final
FROM mcr.microsoft.com/dotnet/aspnet:6.0-alpine AS final
The structure of program.cs has changed for dot net 6. Copy code from this file .
Add custom service references
If you have already added custom services and other changes to startup.cs and program.cs you need to add it to program.vs
This is no longer needed