VS2013: 'warning MSB3061: Unable to delete file' when building a COM interop project

ikantspelwurdz

Well-known member
Joined
Dec 8, 2009
Messages
49
Programming Experience
1-3
I've migrated from VS2010 to VS2013, and am running into a rather annoying issue. I have a project with 'Register for COM Interop' checked off. Half the time when I rebuild or clean, I get this:
C:\Program Files\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(4319,5): warning MSB3061: Unable to delete file "c:\projects\ClassLibrary2\ClassLibrary2\bin\Debug\ClassLibrary2.dll". Access to the path 'c:\projects\ClassLibrary2\ClassLibrary2\bin\Debug\ClassLibrary2.dll' is denied.

If I keep hitting rebuild repeatedly, it will eventually work. But this is going to get annoying really fast.

When I uncheck 'Register for COM Interop,' it rebuilds fine every single time.

Also, disabling UAC entirely does nothing. Just thought I'd try that.
 
Last edited:
Not even possible. I can create a brand new library project, set it to "Register for COM Interop," build, then rebuild and get that error message. No program could possibly be referencing it, because I created it ten seconds ago.
 
Back
Top