Edit

Share via


MSB3644: The reference assemblies for 'FrameworkVersion' were not found

This error occurs when the .NET reference assemblies aren't found for the version of .NET that a project requests. Check that your project has a reference to the Microsoft.NETFramework.ReferenceAssemblies NuGet package. See .NET Framework Targeting Pack Nuget Packages. Or, there could be a problem with the project file, in that the version it's requesting isn't recognized or not installed. Or, there could be an installation issue that the reference assemblies folder for that .NET version isn't present or has been corrupted.

Project file framework identifier and version

Check that there are no spelling or typographical errors in the project file in the TargetFramework, TargetFrameworks, TargetFrameworkIdentifier, or TargetFrameworkVersion properties. For example, the following code in project file generates MSB3644:

    <PropertyGroup Condition="'$(TargetFrameworkIdentifier)' == ''">
        <TargetFrameworkIdentifier>.NETCORAPP</TargetFrameworkIdentifier>
        <TargetFrameworkVersion>3.1</TargetFrameworkVersion>
    </PropertyGroup>

The issue is that the TargetFrameworkIdentifier is misspelled. It should be .NETCOREAPP, not .NETCORAPP (note the missing "e").

When leveraging the TargetFrameworks property and multiple target frameworks, ensure that they're separated with the correct delimiter ;. MSB3644 will occur, for example, when trying to separate frameworks using the , delimiter. Here's an example of the correct syntax:

    <PropertyGroup>
            <TargetFrameworks>net6.0;net5.0;netcoreapp3.1</TargetFrameworks>
    </PropertyGroup>

Reference assemblies folder

Next, note the framework identifier and version requested in the TargetFramework, TargetFrameworkIdentifier, and TargetFrameworkVersion, and look for the reference assembly folder for that version on the local drive. For example, on Windows, the 32-bit reference assemblies for .NET Core should be under C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETCore and 64-bit .NET Framework reference assembly folders for should be under C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework. If the folder for the version your project needs isn't present or appears to be corrupted, you might need to install or reinstall that version. You can install the required version at Download .NET.

See also