Nuget Package

Overview of nuget package usage in altinn studio

Altinn 3 NuGet Packages

Altinn 3 has published a number of nuget packages to share common libraries between different solutions. You can read more about nuget here.

The following nuget packages are available for download here

Procedure for changes involving NuGet Packages

  1. Implement all changes necessary in the NuGet package project. Remember to update the package version, assembly version and file version so they match.
  2. Submit a pull request on these changes only. No implementation on other projects should be included.
  3. Once pull request is approved and changes are merged into master; create and publish new NuGet package based on master branch.
  4. Continue with implementation, referencing the updated package wherever it is needed.
  5. Remember to update all outdated references to the package and check that all tests run successfully before submitting a final PR.

Creating a NuGet package

Detailed documentation on how to create a NuGet package, guidelines etc can be found here.

An example of nuget package creation

Open the project csproj file to edit it as an xml file:

      This class library holds most of the Altinn App business logic and clients for communication with the platform.
    <Authors>Altinn Platform Contributors</Authors>

    <!-- SonarCloud requires a ProjectGuid to separate projects. -->
  1. Save the changes
  2. Open a command line utility like git bash, powershell or cmd.
  3. Navigate to the project folder.
  4. Build the project using Release configuration:
    dotnet build -c Release
  5. Pack the project into a NuGet package:
    dotnet pack -c Release --include-source -p:SymbolPackageFormat=snupkg
    The package will now be created in {projectfolder}\bin\Release.
  6. Navigate to the release folder.
  7. Publish the package:
    dotnet nuget push Altinn.Platform.Storage.Interface.2.5.10.nupkg -k [nuget api key] -s
  8. Your package will now be published to