Bug 2999 - Non-writable files prevent xcode syncing
Summary: Non-writable files prevent xcode syncing
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 2.8.6
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Alan McGovern
Depends on: 3872
  Show dependency tree
Reported: 2012-01-20 21:32 UTC by Jackson Harper
Modified: 2012-03-13 22:03 UTC (History)
6 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jackson Harper 2012-01-20 21:32:26 UTC
My project has some non writable files (because of version control), these prevent the xcode syncing with the following error:

Error updating Xcode project. Access to the path "/Users/jackson/Projects/edictate/edictate/eDictate3/obj/Xcode/5/Icon.png" is denied.


System.UnauthorizedAccessException: Access to the path "/Users/jackson/Projects/edictate/edictate/eDictate3/obj/Xcode/5/Icon.png" is denied.
  at System.IO.File.SetLastWriteTime (System.String path, DateTime lastWriteTime) [0x00000] in <filename unknown>:0 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeSyncedContent.SyncOut (MonoDevelop.MacDev.XcodeSyncing.XcodeSyncContext context) [0x0007c] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeMonitor.UpdateProject (IProgressMonitor monitor, System.Collections.Generic.List`1 allItems, MonoDevelop.MacDev.XcodeIntegration.XcodeProject emptyProject) [0x00324] in /Users/builder/data/lanes/monodevelop-mac- 
  at MonoDevelop.MacDev.XcodeSyncing.XcodeProjectTracker.UpdateXcodeProject (IProgressMonitor monitor) [0x00000] in /Users/builder/data/lanes/monodevelop-mac-
Comment 1 Jackson Harper 2012-01-20 21:38:17 UTC
FWIW, this makes MT pretty difficult to use with TFS.
Comment 2 Sebastien Pouliot 2012-01-20 22:18:30 UTC
-> monodevelop
Comment 3 Jeffrey Stedfast 2012-01-27 17:20:54 UTC
This *might* be fixed now that we don't call File.SetLastWriteTime() anymore...

Strange that the File.Copy() worked but the File.SetLastWriteTime() failed immediately after that. If the unauthed access exception is just due to the SetLastWriteTime(), then this won't be an issue anymore.
Comment 4 Jeffrey Stedfast 2012-03-05 11:54:44 UTC
Jackson: is this still an issue? If so, what version are you using these days?
Comment 5 Jackson Harper 2012-03-05 12:38:11 UTC
Not sure if its still an issue, I had to make all my files writable.  Should be easy enough to test though. Just make a .png in a project readonly and try clean/build/build.
Comment 6 Jeffrey Stedfast 2012-03-05 12:40:37 UTC
Comment 7 Alan McGovern 2012-03-13 22:01:40 UTC
This issue has been fixed in master for sure. I was testing by removing write access for all files/directories in my solution and trying to build/rebuild/sync to xcode. This all works now. These changes will probably not make the deadline for the next 2.8.8.x release but should be in the release after that.