1

I have a .NET Framework 4.7.2 Win Forms application, a .NET Standard 2.0 Class Library, and a couple of .NET Core 3.1 Console Applications in a solution. The class library provides a configuration provider that reads settings from a local settings.json file which all the other applications make use of.

The console applications make use of this class library without issue. The Win Forms application does not. It does not seem to be including any of the required dll's in the class library when compiling. In the output folder, it only has one dll for the class library as a whole, as opposed to the console applications which seem to include all the dll's the class library uses. Specifically I'm referring to a number of NuGet packages, like Newtonsoft.Json, Microsoft.Extensions.Configuration and so on, which are installed to the class library, and not the calling application.

I found that if I manually copy the required Newtonsoft.Json.dll to the Win Forms output folder, it works fine.

The main difference between the console applications and the Win Forms application seems to be the use of framework, .NET Core as opposed to .NET Framework. Perhaps .NET Core builds and includes dependencies differently from .NET Framework, and I need to do additional configuration of such for the Win Forms application?

Magnueil
  • 93
  • 1
  • 9
  • 1
    https://stackoverflow.com/questions/51155274/copy-all-dependencies-from-net-standard-libraries-to-net-framework-console-app – Hans Passant Sep 03 '20 at 13:25

0 Answers0