I have the same issue here. I think it started with 17.6.2 and is still present in 17.6.4. I just tried repairing the installation, as was suggested, but that did not help. Just now it hangs again, cancelling the build will not work, and usually once it is in this state, a reboot of the whole system is required.
The root cause seems to be a file that is locked and cannot be removed. Trying to delete the affected bin folder hangs the Windows Explorer:
Looking with Process Explorer, the System process is the only one that has a handle on the file in question:
To be honest, I'm not even certain if this is a Visual Studio problem, or if one of the more recent Windows Update on the machine has an unexpected interaction with Visual Studio. So just in case: Win10 22H2 (Build 19045.2846)