MonoDevelop can't handle read-only files
I'm using MonoDevelop with MonoTouch. When I add an .NET assembly reference to my project, MonoDevelop will copy that .dll file into the bin/iPhone/Release/xxxx.app directory during the build process. Then later in the build process, it will modify that file and strip out unused stuff.
The problem is, if that file is read-only, MonoDevelop fails the build process because it can't modify (its copy of) the file later. This makes it very difficult to use a source control system like Perforce because Perforce keeps all files read-only until you check them out.
All I want is for MonoDevelop to make the file writabl开发者_运维知识库e when it copies it into bin/iPhone/Release/xxxx.app, which it should always do since it owns that copy of the file.
Does anyone know a way to make MonoDevelop do this, or any other way around this issue?
This is a bug, not something that really should be "answered" on SO. I recommend you report the bug on Novell's bug tracker or worst-case ask the question on IRC in #monodevelop on irc.gimp.net.
Perforce doesn't have to keep everything read-only till checked out. Use p4 typemap and the +w modifier. You do then have to remember to check the file out if its not done by a plug-in or whatever.
As a workaround (until a fix is available) you can try to add a post-build step, inside your project, that will remove the read-only attribute from the assembly file(s).
You could set your Perforce client workspace so that all files are writable, even if they are not opened for edit. Check the allwrite
option at http://www.perforce.com/perforce/doc.current/manuals/p4guide/02_config.html#1067985
精彩评论