7

I see here that it's recommended that I just get the most recent version of the SDK installed, after which all should be well. I installed the most recent version of the 3.1 SDK, though, and am still seeing references to the dangerous version (4.5.0) in most if not all of my solution's two dozen or so project.assets.json files. For example,

 "Microsoft.AspNetCore.Http.Abstractions/2.2.0": {
    "type": "package",
    "dependencies": {
      "Microsoft.AspNetCore.Http.Features": "2.2.0",
      "System.Text.Encodings.Web": "4.5.0"
    },

I'm running VS Version 16.9.4.

Does anyone have a suggestion for the best way to update this assembly throughout my solution?

2
  • 1
    Did you try adding an explicit reference to System.Text.Encodings.Web/5.0.1?<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />
    – Yinqiu
    Jun 23, 2021 at 2:15
  • @Yinqui I did add an explicit reference, but Veracode is telling me I'm still using the old version.
    – RobC
    Jun 23, 2021 at 11:09

1 Answer 1

7

First,run a clean between your builds last time, if it still does not work, please try explicitly specifying 5.0.1 as well as 4.5.1 versions for System.Text.Encoding.Web.

<PackageReference Include="System.Text.Encodings.Web" Version="5.0.1" />

Run dotnet list package --include-transitive in the terminal (workdir: project), it will provide you some details what version is used.You can check it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.