© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
18 replies
TheBrambleShark

❔ 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.'
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
Selkhound/output
and
Selkhound/Selkhound.API.Abstractions/obj
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
Selkhound.Client.dll
file. Building using Visual Studio, with or without cleaning the solution, or using
dotnet build
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?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

File writing
C#CC# / help
3y ago
✅ StreamWriter not writing to file
C#CC# / help
11mo ago
✅ StreamWriter not writing to file
C#CC# / help
2y ago
Cannot open project
C#CC# / help
14mo ago