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

.NET Core Web API Newtonsoft.Json Nuget Dependency Warning

$
0
0

I have the following Web API solution structure with three projects in a .NET 5 Web Api

.  +-- Api.csproj  |   +-- Dependencies|   |   +-- Projects|   |   |   +-- Infrastructure.csproj|   |   |   |   +-- Dependencies|   |   |   |   |   +-- Projects|   |   |   |   |   |   +-- Core.csproj|   |   |   |   |   +-- Packages|   |   |   |   |   |   +-- Serilog.Sinks.Telegram (2.0.1)|   |   |   |   |   |   |   +-- Newtonsoft.Json (11.0.2)

When I build Infrastructure.csproj, it succeeds, but 2 strange issues

  • Build warning Infrastructure.csproj : warning NU1603: Serilog.Sinks.TelegramClient 2.0.1 depends on Newtonsoft.Json (>= 10.0.0) but Newtonsoft.Json 10.0.0 was not found. An approximate best match of Newtonsoft.Json 10.0.1 was resolved.
  • Looking in the \debug folder, I don't see any dlls for Serilog or Newtonsoft.

When I build Api.csproj, it succeeds, but again strange issues

  • Build warning Infrastructure.csproj : warning NU1603: Serilog.Sinks.TelegramClient 2.0.1 depends on Newtonsoft.Json (>= 10.0.0) but Newtonsoft.Json 10.0.0 was not found. An approximate best match of Newtonsoft.Json 10.0.1 was resolved.
  • Build warning Api.csproj : warning NU1603: Serilog.Sinks.TelegramClient 2.0.1 depends on Newtonsoft.Json (>= 10.0.0) but Newtonsoft.Json 10.0.0 was not found. An approximate best match of Newtonsoft.Json 10.0.1 was resolved.
  • Looking in the \debug folder of the Api.csproj, I do see Serilog and Newtonsoft dlls.
  • The Newtonsoft dll in debug has a version of 12.0.3.*

My Questions:

  1. Is it right that there are no Serilog or Newtonsoft dlls in Infrastructure.csproj output folder?
  2. Why am I getting a warning about Newtonsoft for the Api.csproj build when the dll is correctly put into output folder and the version is greater than the warning?

Viewing all articles
Browse latest Browse all 3067

Trending Articles



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