I have installed Visual Studio 2022 on my PC today. I have an old app, which targets .NET 4.5. I see this error when attempting to build/compile the project:
"Error MSB3644 The reference assemblies for .NETFramework,Version=v4.5 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
Is there anything else I can try?
CodePudding user response:
Because you might install a higher version of .net framework firstly, so installer might stop you install a lower version of .net framework
There is another way can try to fix it without reinstalling.
- Download
- Modify the file extension name from
microsoft.netframework.referenceassemblies.net45.nupkg
tomicrosoft.netframework.referenceassemblies.net45.zip
and Unzip the download file - copy the files from
build\.NETFramework\v4.5\
toC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5
- Run your project again.
Note
This way might also work for .net4.0 Microsoft.NETFramework.ReferenceAssemblies.net40 or other older version which Microsoft might not support in feature