Skip to content
Latchkey

MSBuild "MSB3644: reference assemblies were not found"

MSBuild could not find the reference assemblies (the targeting pack) for the .NET Framework version your project targets. On Linux/CI runners these packs are frequently absent.

What this error means

Build fails with MSB3644 naming a .NETFramework,Version=vX.Y whose reference assemblies are missing, suggesting you install the targeting pack or retarget. Common when building classic .NET Framework projects on hosted runners.

MSBuild output
error MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found.
To resolve this, install the Developer Pack (SDK/Targeting Pack) for this framework
version or retarget your application.

Common causes

Targeting pack not installed

The reference assemblies for the targeted .NET Framework version are a separate developer pack that is not present on the runner.

Building .NET Framework on Linux

Classic .NETFramework targeting packs are Windows-oriented. A Linux runner without Mono/reference-assembly packages cannot resolve them.

How to fix it

Build .NET Framework on a Windows runner

Classic Framework projects build most reliably on windows-latest where the targeting packs ship.

.github/workflows/ci.yml
jobs:
  build:
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v4
      - run: dotnet build -c Release

Install the targeting pack

On Windows runners, install the developer pack for the framework version, or reference the targeting-pack NuGet package.

.csproj
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies.net472" Version="1.0.3">
  <PrivateAssets>all</PrivateAssets>
</PackageReference>

Or retarget to a modern framework

  1. If the project can move, retarget <TargetFramework> to net8.0 and build cross-platform.
  2. Confirm dependencies support the new target before switching.
  3. Keep Framework-only projects on Windows runners until they are migrated.

How to prevent it

  • Build classic .NET Framework projects on Windows runners.
  • Add the Microsoft.NETFramework.ReferenceAssemblies package for Framework targets.
  • Migrate to net8.0+ where possible for cross-platform CI.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →