System.Text.Json 8.0.0.4 has a security vulnerability and should not be used. 9 is the current version for all frameworks. You should update your nuget package references in the application project.
Build automation - Deployment Center - failing System.Text.Json 8.0.0.4 - Including fix C# ASP.NET
Poelder, Niels
0
Reputation points
I have getting an error with my latest build using DotNet 8.0 when using the "Deployment Center" on Azure which is connected to my git repo. I couldn't find a fix specifically online so I dug deeper and through trail and error I've come to this solution.
..... Could not load file or assembly 'System.Text.Json, Version=8.0.0.4,
Regardless of SDK version you have selected as preffered, it seems to auto want to go for sdk version 9 of DotNet wich may not be desired.
I have come up with a simple workaround:
- Check out your versions of the DotNet in your application using console.
- Create a global.json file with the following code:
{ "sdk": { "version": "8.0.400" // Put your version here } }
- Commit and push the changes for the Deployment Center to run the auto build and now it should build :)