Fix it fast
Most likely: The build machine has the runtime or .NET SDK, but not the reference assemblies for the exact .NET Framework version shown in the error.
1. Confirm this is your error
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. 2. Check the cause
dotnet --info
grep -R -n "<TargetFramework\|<TargetFrameworks\|<TargetFrameworkVersion\|<TargetFrameworkIdentifier" *.csproj Directory.Build.props
dotnet build -v normal 3. Apply the safe fix
# Windows build agents: install the Developer Pack or Targeting Pack for the exact .NET Framework version in the error.
# Cross-platform or CI fallback for SDK-style projects:
dotnet add package Microsoft.NETFramework.ReferenceAssemblies
dotnet restore
dotnet build 4. Verify it works
dotnet restore
dotnet build Don't use unsafe shortcuts
- Do not install only the .NET Framework runtime, MSBuild needs reference assemblies to compile.
- Do not retarget the project just to silence MSB3644 unless the app is intentionally moving frameworks.
- Do not assume a new .NET SDK includes old .NET Framework targeting packs.
What Broke in the Build
MSBuild cannot find .NET Framework reference assemblies because the targeting pack is missing, the target framework is wrong, or the fallback package is absent.
Fix the underlying build failure
Check TargetFramework, TargetFrameworks, TargetFrameworkIdentifier, and TargetFrameworkVersion for typos or bad delimiters.
Install the Developer Pack or Targeting Pack for the exact version shown in the error, or add Microsoft.NETFramework.ReferenceAssemblies when that fallback fits your build.
Retry the build with dotnet build or msbuild.
Prove the Build Path Is Clean
Build succeeds without MSB3644.
The requested framework now resolves via installed reference assemblies or the Microsoft.NETFramework.ReferenceAssemblies package.
Validation
Re-run the failing command and confirm the original code/message is gone, and confirm expected artifacts or outputs exist (packages restored, build/publish succeeds).
Why the Build Fails
Usually this comes down to the required .NET Framework Developer Pack or Targeting Pack is missing on the build machine, target framework properties are misspelled or malformed, so MSBuild looks for the wrong framework, or the CI agent image changed and dropped older targeting packs.
Mechanism
MSBuild needs .NET Framework reference assemblies to compile, not just the runtime. If the targeting pack for the requested .NET Framework version is missing, MSB3644 is emitted.
Keep Build Prerequisites Consistent
To prevent this, document .NET Framework build prerequisites and enforce them on CI images, and pin CI images and validate the toolchain after image upgrades.