Hi Sri Adapa,
Thanks for reaching out on Microsoft Q&A.
To resolve the MSB4018: GenerateDepsFile
error, first ensure that all your NuGet packages, especially System.Text.Json
, are up to date, and confirm that your project is targeting the correct framework (NET 6.0). Next, clear the NuGet cache using dotnet nuget locals all --clear
or through Visual Studio’s cache management. Then, reinstall System.Text.Json
by running Install-Package System.Text.Json -Version 6.0.0
. Finally, restore the project dependencies with dotnet restore
and rebuild the solution.
Hope it helps!
If you found this answer helpful, please upvote and mark it as accepted to close the thread. Thanks!