Skip to content

Migrate unp4k to .NET 6+ for Linux/Docker compatibility #63

@jpugsley-pro

Description

@jpugsley-pro

Summary

unp4k is currently built against netcoreapp2.0, which is no longer supported in modern .NET SDKs or runtime Docker containers. This makes it difficult to run the tool in Linux environments (e.g. Docker, WSL2, CI pipelines, servers).

Problem

Attempting to run unp4k.dll inside a Linux container fails with:

The library 'libhostpolicy.so' required to execute the application was not found...
Framework: 'Microsoft.NETCore.App', version '2.0.0'

Even when built inside a Docker image using dotnet publish -r linux-x64, the lack of a runtimeconfig.json with a supported framework prevents it from executing.

Suggested Fix

Update the unp4k.csproj to target at least netcoreapp3.1 or preferably net6.0 or net8.0. This would:

  • Enable Docker-based usage
  • Avoid requiring deprecated runtime hacks
  • Ensure future-proofing as .NET 2.0 continues to be deprecated across environments

If the repo owner is open to it, I’d be happy to contribute a PR with the project file updates and Linux/Docker compatibility tested.

Environment

  • Docker SDK image: mcr.microsoft.com/dotnet/sdk:6.0
  • Host OS: Debian 12
  • .NET SDK: 6.0.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions