Geir Smestad
Geir Smestad

Reputation: 1394

Xamarin Designer for iOS in Visual Studio: UnauthorizedAccessException when editing storyboard

I'm using Xamarin.iOS version 8.10.2 with Visual Studio 2013.

When editing a Storyboard (named NewStoryboard) using the designer in Visual Studio, I get the message "There was a problem rendering this document", with the details "System.UnauthorizedAccessException: Access to the path 'D:\Projects\App\MyTableViewController.designer.cs' is denied". It's worth noting that MyTableViewController.designer.cs belongs to a different Storyboard in the same project.

I am unable to use the Storyboard Designer, which is a big problem when trying to create a storyboard.

Upvotes: 0

Views: 554

Answers (1)

Geir Smestad
Geir Smestad

Reputation: 1394

For some reason, Xamarin.iOS needs write access to the other Storyboards you have in your project when you are editing a Storyboard in the designer. You would normally not notice this, but TFS flags all files under source control as read-only. Hence the exception when editing a Storyboard.

You can't remove the read-only flag of these files in Explorer, but a possible workaround is to right-click -> "Check Out for Editing" on all the files of your other storyboards. These files will now have the read-only flag removed.

Option B is to stop using TFS and migrate to Git.

Upvotes: 3

Related Questions