Quantcast
Channel: Active questions tagged nuget-package - Stack Overflow
Viewing all articles
Browse latest Browse all 3067

Package reference on net framework doesn't load transitive dependencies (not copied in output)

$
0
0

From scratch :

  1. Create a class library A in net framework 4.7.2
  2. Reference a nuget package, ex : Newtonsoft
  3. Migrate class library A to Package Reference mode
  4. Generate nuget package for class library A
  5. Create a console application B in net framework 4.7.2
  6. Reference class library A
  7. Migrate console application B to Package Reference mode

My issue is that Newtonsoft is not copied in output of console application B, so :

If I use a function of A in B which has newtonsoft object in signature : error of compilation => need to reference Newtonsoft in console application B

If I use a function of A in B which use newtonsoft object in its body : error on runtime => FileNotFoundException


Viewing all articles
Browse latest Browse all 3067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>