NuGet Package Reference NU6105 Publish Error

Friday, December 26, 2025
This is a repost from my old blog. First posted in 11/11/2020.

Some of my .NET Core applications are already using PackageReference which is a very nice idea. However, through a combination of packages, Visual Studio did not allow me to publish my project although it built fine.


During publish, it threw error on NU6105 warning. Along with that most of it comes with the following message:

Detected package downgrade

Some developers solve it by finding which package caused the issue and manually added them through NuGet, but I find them troublesome until I found the following article:

https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings/nu1605


In my case, all I need to do to solve it is to install the following NuGet package:

Microsoft.NETCore.Targets