❔ Cannot open output file for writing

Hi all, trying to build my project with Visual Studio. Whenever I do I get an error from CSC stating the following:
Cannot open 'D:\Projects\apps\LuzFaltex\Selkhound\Selkhound\src\Selkhound.API.Abstractions\obj\Debug\Selkhound.API.Abstractions.dll' for writing -- 'The process cannot access the file 'D:\Projects\apps\LuzFaltex\Selkhound\Selkhound\src\Selkhound.API.Abstractions\obj\Debug\Selkhound.API.Abstractions.dll' because it is being used by another process.'


To fix this, I have tried closing out of Visual Studio and deleting both the Selkhound/output and Selkhound/Selkhound.API.Abstractions/obj directory, but the next time it builds I just get the same exception on build again. I also get this exception for the Selkhound.Client.dll file. Building using Visual Studio, with or without cleaning the solution, or using dotnet build on the command line has the same results.

The build log suggests that the projects are being built multiple times in parallel, though I'm not sure if that's a contributing factor here.

Any thoughts of what I might do to fix this?
Was this page helpful?