Hi @Matthew Armshaw ,
Does the error message show any file name?
Even rebooting the machine didn’t work, I doubt that the locked file is related to system environment.
This document: Linker Tools Error LNK1168 says:
This error is often caused by a transient condition – for example, a lock held by an anti-virus program, a file search indexing process, or a delay in releasing a lock held by the Visual Studio build system.
Have you also tried to check the anti-virus program, maybe try to disable it temporarily and reboot your machine?
Please also try to run VS as administrator.
Another suggestion is to update Windows OS, make sure all the patches have been installed, and no Windows Update program is running in the background.
I doubt this is a temporary issue and maybe the next time you launch your machine, the issue disappears.
Best regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.