Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4791 pages
Node.js, PHP and APIs

MSBuild cannot find the reference assemblies for the target framework

Your error

MSB3644: The reference assemblies for .NETFramework,Version=v4.7.2 were not found.2 more lines it can show

Fix it fast

Most common cause, 1 of 4

The targeting pack for that .NET Framework version is not on this machine

Reference the Microsoft.NETFramework.ReferenceAssemblies NuGet package, which carries the reference assemblies and needs no admin install, so the build works on any machine with MSBuild or the .NET SDK.

Fix
<ItemGroup>
  <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
</ItemGroup>
Did this fix it?
Full steps for this cause: check, fix, verify

Short answer

MSB3644 means MSBuild found no reference assemblies for the framework version the project asks for. Usually that .NET Framework targeting pack is missing on the machine, the project targets 4.0 to 4.5.1 which Visual Studio 2022 and later cannot build, or TargetFramework is misspelled. The Microsoft.NETFramework.ReferenceAssemblies package fixes the first case anywhere. Applies to VS 2022 and 2026.

  • Applies to Visual Studio 2026 (18.x) and 2022 (17.14), .NET SDK 10.0 and 11.0, .NET Framework 4.6.2 to 4.8.1, Microsoft.NETFramework.ReferenceAssemblies 1.0.3
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Which cause do you have?

Read which framework the project requests, then look for a reference assembly folder with that version number. The two answers together point to one of the causes.

Run this first
findstr /s /i "TargetFramework" *.csproj
dir "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework"
dir "C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework"

Then find the line you see in this list and open its fix:

  1. 1The targeting pack for that .NET Framework version is not on this machineThe project asks for v4.6.2 to v4.8.1, and no folder with that version exists, typically on a fresh build agent or a Build Tools install
  2. 2The project targets .NET Framework 4.0 to 4.5.1, which current Visual Studio cannot buildTargetFrameworkVersion is v4.0, v4.5 or v4.5.1, and the build runs in Visual Studio 2022 or 2026
  3. 3A typo or the wrong separator in the target framework propertiesThe framework name in the error looks odd, for example .NETCORAPP, or several frameworks run together in one name
  4. 4The Visual Studio or MSBuild doing the build is older than the project's .NET versionThe framework in the error carries a version .NET Framework never had (above 4.8.1), and msbuild -version prints 16.x or lower

What does the error look like?

  • 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.
  • You can download .NET Framework Developer Packs at https://aka.ms/msbuild/developerpacks

Cause 1 of 4

The targeting pack for that .NET Framework version is not on this machine

You seeThe project asks for v4.6.2 to v4.8.1, and no folder with that version exists, typically on a fresh build agent or a Build Tools install

Check

MSB3644 for a supported .NET Framework version usually means its targeting pack was never installed here. Microsoft's description of the error says it appears when the reference assemblies folder for the requested version is absent or damaged. A machine gets the pack either from a Visual Studio installer component or from a standalone Developer Pack, so a build box set up any other way may have neither.

Check
findstr /s /i "TargetFrameworkVersion TargetFramework" *.csproj

Fix

Reference the Microsoft.NETFramework.ReferenceAssemblies NuGet package, which carries the reference assemblies and needs no admin install, so the build works on any machine with MSBuild or the .NET SDK. Installing the Developer Pack for that version from Microsoft's download page also works, but must be repeated on every machine.

Fix
<ItemGroup>
  <PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" />
</ItemGroup>

Verify

Restore and build again; the MSB3644 line is gone from the output.

Verify
msbuild -restore
msbuild

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 4

The project targets .NET Framework 4.0 to 4.5.1, which current Visual Studio cannot build

You seeTargetFrameworkVersion is v4.0, v4.5 or v4.5.1, and the build runs in Visual Studio 2022 or 2026

Check

Microsoft's developer install guide states that from Visual Studio 2022 on, the components for .NET Framework 4.0 through 4.5.1 are gone and apps targeting them cannot be built. Those versions are out of support, as are 4.5.2, 4.6 and 4.6.1 since 26 April 2022.

Check
findstr /s /i "<TargetFrameworkVersion>v4.0 <TargetFrameworkVersion>v4.5" *.csproj

Fix

Retarget the project to a supported version, ideally 4.8.1 or at least 4.6.2, and rebuild. Run your tests after the change. If retargeting is impossible right now, the guide's stated fallback is building with Visual Studio 2019.

Fix
<!-- classic project -->
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<!-- SDK-style project -->
<TargetFramework>net481</TargetFramework>

Verify

The project builds in the current Visual Studio and the output folder holds the new assembly.

Verify
msbuild -restore

Confirmed by learn.microsoft.com

Did this fix it?

Cause 3 of 4

A typo or the wrong separator in the target framework properties

You seeThe framework name in the error looks odd, for example .NETCORAPP, or several frameworks run together in one name

Check

If TargetFramework, TargetFrameworks, TargetFrameworkIdentifier or TargetFrameworkVersion holds a misspelled value, MSBuild looks for reference assemblies that cannot exist. The MSB3644 page calls out two mistakes: an identifier such as .NETCORAPP instead of .NETCOREAPP, and a comma instead of a semicolon between frameworks.

Check
findstr /s /i "TargetFrameworks TargetFrameworkIdentifier" *.csproj *.props

Fix

Correct the spelling, and separate several frameworks with semicolons only.

Fix
<PropertyGroup>
  <TargetFrameworks>net10.0;net481</TargetFrameworks>
</PropertyGroup>

Verify

Each framework builds as its own output folder, such as bin\Debug\net10.0 and bin\Debug\net481.

Verify
dotnet build

Confirmed by learn.microsoft.com

Did this fix it?

Cause 4 of 4

The Visual Studio or MSBuild doing the build is older than the project's .NET version

You seeThe framework in the error carries a version .NET Framework never had (above 4.8.1), and msbuild -version prints 16.x or lower

Check

Microsoft's SDK and Visual Studio versioning page explains that each new TargetFramework needs a new Visual Studio or SDK, and that an SDK will not load in Visual Studio older than its minimum. For example, net10.0 needs Visual Studio 18.0 and net11.0 needs 18.12. An old build server or Visual Studio 2017 cannot resolve a modern target, and the build fails before compiling.

Check
msbuild -version

Fix

Build with a Visual Studio or Build Tools release that supports the target, or call dotnet build from a matching .NET SDK. On CI, move the job to an agent image with a current Visual Studio.

Fix
dotnet --list-sdks
dotnet build -c Release

Verify

msbuild -version reports 18.x (or the SDK build completes) and MSB3644 no longer appears.

Verify
msbuild -version

Confirmed by learn.microsoft.com

Did this fix it?

How do I stop it coming back?

  • Add Microsoft.NETFramework.ReferenceAssemblies to every .NET Framework project, so a build machine never depends on an installed targeting pack.
  • Keep TargetFramework values in one Directory.Build.props, which makes a typo show up once instead of in a dozen projects.
  • Record the minimum Visual Studio version beside the TargetFramework in the README, and bump both in the same pull request.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.

Which stack is behind this page?

Projects of mine on the same stack: Raheeb, Loade Driver, Dhero.

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.