Error NU1605 Detected package downgrade

前端 未结 3 1770
清酒与你
清酒与你 2021-02-11 12:07

I am experiencing the following NU1605 dependency errors in my netcoreapp2.0 console application:

NU1605  Detected package downgrade: System.Dia         


        
3条回答
  •  名媛妹妹
    2021-02-11 12:35

    I had a similar issue with a .netcoreapp2.2 console application.

    The project was building successfully. However, publishing was failing with several NU1605 errors.

    The problem was originated from log4net version 2.0.8. It was referenced in a .netstandard2.0 project with the following dependencies:

    They were causing package downgrades in the projects referencing log4net. And during publish these warnings are treated as errors...

    To solve the problem I added correct versions of these libraries via Nuget.

    Finally, the publishing succeeded.

    P.S. When I first added packages with the newest version of libraries, a yellow warning sign was displayed on the dependencies list as if the packages were not suitable for that project. After unloading the project and loading back the warning sign gone! (I'm using Visual Studio 2019)

    Hope it helps!

提交回复
热议问题