79218418

Date: 2024-11-23 17:20:55
Score: 2
Natty:
Report link

I am having the exact same problem as author - it just began a few days ago. For me, it occurs when deploying in a Devops Pipeline to a staging slot on my webapp. I'm using NET6 for this app. My deployment log looks fine until it hits this error

C:\Program Files (x86)\dotnet\sdk\9.0.100\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1060: Error reading assets file: 
Error loading lock file 'C:\home\site\repository\obj\project.assets.json' : 
Could not load file or assembly 'System.Text.Json, Version=8.0.0.4, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. 
The system cannot find the file specified. [C:\home\site\repository\[MyApp].csproj]
    Done Building Project "C:\home\site\repository\[MyApp].csproj" (default targets) -- FAILED.

My temp solution was to create a brand new slot and, using VS Code's Azure Tools extension, do a Azure App Service: Deploy to Slot. This only works on a brand new slot - it fails if I try to deploy to the slot that previously failed above.

I'm confused on what 'Version=8.0.0.4' is anyway? Why 4 levels? Shouldn't it be 8.0.0?

Any advice on how to actually fix the problem in my Devops deploy would be welcome.

Reasons:
  • Long answer (-1):
  • Has code block (-0.5):
  • Me too answer (2.5): I am having the exact same problem
  • Contains question mark (0.5):
  • Low reputation (0.5):
Posted by: Mike Smith