2

Created 3 projects in a solution.

A. Class library targeting .NET Standard Library Retrieving a database value using System.Data.SqlClient which is added via NuGet

B. .NET Core console application : Referencing project A to display the DB value

C. .NET Framework console application : Referencing project A to display the DB value

Project B works fine when running, but Project C gives below runtime error.

enter image description here

If I add the System.Data.SqlClient in Project:C, then it will start working. Is it mandatory to add dependent NuGet packages of project A to project C?

Also I want to know the reason of different behavior between .NET Core and .NET Framework console applications.

Bruno Garcia
  • 6,029
  • 3
  • 25
  • 38
Anto Varghese
  • 3,131
  • 6
  • 31
  • 38

0 Answers0