0

My setup - VS2019, FW-style project, FW 4.7.2. Project is set to use <PackageReference ... (vs packages.config)

Look at the picture. I don't have System.Runtime.CompilerServices.Unsafe.4.6.0 referenced and yet, it is telling me that I am updating it. I can't go into dependency packages in this project but in my SDK netstandard2.0 project it does same thing for this package (and System.Threading.Tasks.Extensions). And I went into package hierarchies and I don't see this package as dependency in any of the packages down this hierarchy.

Motivation - I noted in the build messages that Assembly version selected is from package version 4.6.0 (4.0.5.0) while I needed one from package 4.7.1 (4.0.6.0). I needed it because next level project, which uses output of this solution build, needed that newer version to run properly.

enter image description here

4
  • What is "FW"? By "FW-style project, FW 4.7.2. Project", do you mean a legacy style project targeting .NET Framework 4.7.2? Commented 2 days ago
  • @JonathanDodds Exactly. legacy framework style project with PackageReferences - non-SDK. SDK however has same behavior. target framework - net472
    – T.S.
    Commented 2 days ago
  • Is this package a Transitive package? if a package you reference depends on other packages, those dependencies are automatically included in your project. This can lead to situations where packages are updated or replaced even if you didn’t directly. Please open Nuget Package Manager and type keyword(e.g:CompilerServices) to check if you have installed it. Commented 2 days ago
  • @DouXu-MSFT I don't see any Transitives in these projects. And as I pointed out - 2 separate projects of different types behave same with these packages. I checked the hierarchies and I don't see these packages anywhere in dependency.
    – T.S.
    Commented yesterday

0

Browse other questions tagged or ask your own question.