[MonoDevelop] Cannot rebuild due to file permissions in build dir

Michael Hutchinson m.j.hutchinson at gmail.com
Sat Feb 5 14:34:37 EST 2011


On Thu, Jan 27, 2011 at 6:00 PM, Len Charest <len at shingl.com> wrote:
> Since upgrading to MD 2.4.2, I've had problems with rebuilding projects. On
> initial build, some files (DLLs) are copied into the build directory as
> read-only (perms 0444). On subsequent rebuild, MD complains that it does not
> have permission to delete the files from the build directory, and the build
> fails.
>
> Manually running "chmod +w *" (or "rm -f ./*") in the build directory allows
> the rebuild to succeed, but it's not a viable solution. Neither of these
> commands can be used as pre-build actions since actions are run *after* the
> MD build system attempts to clean the build directory.
>
> Is this a known problem and is there a work-around?

It's not a known problem. Is it just with that specific case, or can
you reproduce it with other projects? Are there any aspects of this
projects that seems like they could be relevant - e.g. where is the
file copied from, how is it copied (e.g. "local copy", are you using
the experimental xbuild integration, is there anything in common
between the dlls that get copied ro, etc?

It would be great if you could file a bug to track this:
http://monodevelop.com/Developers/Reporting_Bugs

> Some additional info: I'm running MD 2.4.2 on a MacBook Pro with MacOS
> 10.6.6. I also have the latest Mono and MonoTouch bits.
>
> Here's the detail of one of the errors I see when rebuilding a project that
> is not under version control:
>
> System.UnauthorizedAccessException: Access to the path
> "/full/path/to/project/builddir/System.Data.Services.Client.dll" is denied.
>   at System.IO.File.Delete (System.String path) [0x00000] in <filename
> unknown>:0
>   at MonoDevelop.Core.FileSystem.DefaultFileSystemExtension.DeleteFile
> (System.String file) [0x00000] in <filename unknown>:0
>   at MonoDevelop.Core.FileService.DeleteFile (System.String fileName)
> [0x00000] in <filename unknown>:0
>
> Here's an error detail for a project that is under SVN control:
>
> System.UnauthorizedAccessException: Access to the path
> "/full/path/to/project/builddir/System.Data.Services.Client.dll" is denied.
>   at System.IO.File.Delete (System.String path) [0x00000] in <filename
> unknown>:0
>   at MonoDevelop.VersionControl.Subversion.SubversionRepository.DeleteFiles
> (MonoDevelop.Core.FilePath[] paths, Boolean force, IProgressMonitor monitor)
> [0x00000] in <filename unknown>:0
>   at MonoDevelop.VersionControl.Repository.DeleteFile (FilePath localPath,
> Boolean force, IProgressMonitor monitor) [0x00000] in <filename unknown>:0
>   at MonoDevelop.VersionControl.VersionControlFileSystemExtension.DeleteFile
> (System.String file) [0x00000] in <filename unknown>:0
>   at MonoDevelop.Core.FileService.DeleteFile (System.String fileName)
> [0x00000] in <filename unknown>:0
>
> The latter stack trace is odd to me because the build directory itself is
> not under version control.

The version control clients get to intercept all file
creations/deletion operations in case they're inside VCS-controlled
paths.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list