task: upgrade services from .netcore31 to .net6
the idea: creating MTF-libraries referencing net6 and (netcore31 or netstandard21)
how: jenkins, docker on linux
Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0 as build
copy --FROM=mcr.microsoft.com/dotnet/core/sdk:3.1 /usr/share/dotnet/shared /usr/share/dotnet/shared
building and using the created MTF library - all is well
the trouble: using the library created by Jenkins job fails
Error CS1705 Assembly '...***...* uses 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' which has a higher version than referenced assembly 'System.Runtime' with identity 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
any ideas? What is missing on docker or jenkins?