MSBUILD Could not copy back original file Access to the path is denied

Category: visual studio msbuild

Question

DavMol2k on Tue, 17 Mar 2015 13:35:13


Having a very odd error when compiling me solution.

I have a solution with about 19 projects, we control the AssemblyVersion, and AssemblyFileVersion using a shared AssemblyInfo.cs this keeps all our version inline when building a release. This has worked fine for the past two years, but today I have changed both the AssemblyVersion, and AssemblyFileVersion and one project had started giving me the following error

delete [DLL Obj Folder Path] Access to the path '[DLL Obj Folder Path]' is denied. [DLL Obj Folder Path

I have looked in the build output and we get the following

6>MSBUILD : OpenAccess Enhancer warning 0: Could not copy back original file. Access to the path '[DLL Obj Folder Path]' is denied.
6>[DLL Obj Folder Path](-1,-1): OpenAccess Enhancer error 0: delete [DLL Obj Folder Path] Access to the path '[DLL Obj Folder Path]' is denied.

If we only change the AssemblyFileVersion then the project will compile.

Cant find anything on this, thanks for any help.

Replies

ranta on Tue, 17 Mar 2015 17:52:38


You could run a trace with Process Monitor and check which file OpenAccess Enhancer is trying to access and why it fails. However, if it is unclear why it is trying to access that file in the first place, then I think it would be best to ask in Telerik Community, because OpenAccess Enhancer appears to be part of the Telerik OpenAccess ORM product.