MSBuild "MSB3644: reference assemblies were not found"
By Daniel Zoghalchali·Latchkey
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.
If the project can move, retarget <TargetFramework> to net8.0 and build cross-platform.
Confirm dependencies support the new target before switching.
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.
Frequently asked questions
What causes MSBuild "MSB3644: reference assemblies were not found"?
There are 2 common causes: targeting pack not installed and building .net framework on linux. The reference assemblies for the targeted .NET Framework version are a separate developer pack that is not present on the runner.
How do I fix MSBuild "MSB3644: reference assemblies were not found"?
There are 3 fixes depending on which cause you have: build .net framework on a windows runner, install the targeting pack, and or retarget to a modern framework. Work through them in order, since the first is the most common.
What does MSBuild "MSB3644: reference assemblies were not found" actually mean?
Build fails with MSB3644 naming a .NETFramework,Version=vX.Y whose reference assemblies are missing, suggesting you install the targeting pack or retarget.
How do I stop MSBuild "MSB3644: reference assemblies were not found" happening again?
Build classic .NET Framework projects on Windows runners. The prevention section lists 3 changes that keep it from recurring.