'Project '..' targets 'net5.0'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.7.2'

I created my initial project that targets Framework version v4.7.2. I needed to add a class library in my project using visual studio 2022 Community. While doing so, VS2022 gave me only 4 options to choose from for setting Target Framework (.Net Standard 2.0, .Net Standard 1.0, .Net 5.0, .Net 6.0). This feature isn't there in VS2019 Community. I selected .NET 5.0

Now this class library cannot be referenced by my initial project. I think I need to update .NET Core SDK but don't know which version (if I am correct in my assumption).

Please help. Thanks



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source