Trying To Build In Visual Studio 2017 'bin\roslyn' Files Lock

This has been pissing me off a lot recently.  It seems to happen after I've rebased and then tried to recompile my solution at random time.  Visual Studio complains that it can't compile the solution because the 'roslyn' folder within the 'bin' folder is locked:  

 

The obvious solution is to try and delete the folder, however, when you go to delete it, Windows moans the file's locked.  I use a file unlock program called 'What Is Locking This File?' and that doesn't always fix it, I've also shut down my solution with no luck and a few times I've also closed VS without the issue going away!!!  To fix the issue, in Task Explorer, find the 'VBCSCompiler.exe' process(es) and KILL IT(them).

 

Job Done! 

 

 

submit to reddit

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

Back to top