Thank you for reaching out.
This issue is not caused by your project or any recent code changes. The failure is happening before the build even reaches your code.
During the build, Visual Studio runs an internal NuGet step (ResolvePackageAssets). That step relies on Visual Studio and .NET build tooling being in a healthy state. In your case, the tooling cannot load the required System.Runtime 6.0 assembly, which indicates the Visual Studio / .NET build environment on the machine is corrupted or partially updated.
Because this is an environment issue, actions like cleaning the solution, deleting bin/obj, clearing NuGet caches, switching branches, or reinstalling individual .NET SDKs do not resolve it.
What you should do next
- Try repairing Visual Studio
- Open Visual Studio Installer
- Select your Visual Studio 2022 installation
- Choose Repair
- Restart the machine and try building again
- If the installer fails to launch or repair does not help
- Remove Visual Studio using InstallCleanup.exe (this fully removes corrupted setup and shared components)
- Reinstall Visual Studio 2022 fresh
- As a temporary workaround
- You may install Visual Studio 2026 Community side‑by‑side to unblock work, but this does not fix the underlying issue. A clean Visual Studio 2022 install is still recommended.
This approach aligns with Microsoft’s guidance for build failures caused by missing internal runtime components and installer corruption.
Please let us know if you require any further assistance, we’re happy to help. If you found this information useful, kindly mark this as "Accept Answer". So that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.