Last modified: Sep 18, 2023

Breaking changes

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.

  1. Update target framework and package dependencies

    Install .Net 6 SDK before you start changing code.

    Navigate to you application repository and find App.csproj in the App folder.

    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">
    <PackageReference Include="Altinn.App.Common" Version="6.0.0" />
    <PackageReference Include="Altinn.App.PlatformServices" Version="6.0.0" />
  2. 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 AS build


    FROM AS build

    And update the runtime image by replacing

    FROM AS final


    FROM AS final
  3. Update program.cs
    The structure of program.cs has changed for dot net 6. Copy code from this file .

  4. 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

  5. Delete startup.cs
    This is no longer needed