I Am trying to build to 2 frameworks. we currently have a website running on .net framework 4.7.1
I am trying to facilitate a move to .net8.0 For now i want our website and all referenced classes to build to these 2 framework.
Googling around told me i should add this in the csproj file:
<TargetFrameworks>net8.0;net471</TargetFrameworks>
however after doing this i get following error:
The reference assemblies for .NETFramework,Version=v4.0 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
What is the correct way to build to these 2 frameworks?