'Error when trying to use Nuget to get System.Data.SqlClient

I have two projects in my solution. One is using .Net 5.0 and the other is using .Net Framework 4.5

When I tried to add code that will call a stored procedure I was told that I needed to get a new version of System.Data.SqClient dll.

I selected to install 4.5 and at the end of the installation process I received the following error:

Could not install package 'System.Data.SqlClient 4.5.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

I am unable to "update" the project that is using 4.5 to use 5.0 because the "highest" version displayed s 4.7.2 image 1

I'm thinking I chose the wrong type of project and that is the problem but I'm not sure.

Any help would be greatly appreciated.



Sources

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

Source: Stack Overflow

Solution Source