I am trying to publish a c# project via docker image mcr.microsoft.com/dotnet/sdk:5.0 (https://hub.docker.com/_/microsoft-dotnet-sdk/).
In one of the *.csproj files is a definition like <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
I am getting the following error
/usr/share/dotnet/sdk/5.0.301/Microsoft.Common.CurrentVersion.targets(1216,5): error MSB3644:
The reference assemblies for .NETFramework,Version=v4.6.1 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
I have tried to install some dependencies from https://hub.docker.com/_/microsoft-dotnet-runtime-deps/ but this doesnt help me out.
I have searched hours to find a tutorial to install Developer Packs in linux distributions but found nothing.
Any ideas?