Bug 54661 - [15.1] VS crashes on "Access to the path '...Entitlements.plist' is denied" when trying to access iOS Application settings if Entitlements.plist is marked read-only
Summary: [15.1] VS crashes on "Access to the path '...Entitlements.plist' is denied" w...
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.4.0 (15.1)
Hardware: PC Windows
: High major
Target Milestone: 15.3
Assignee: Bugzilla
URL:
: 55388 ()
Depends on:
Blocks:
 
Reported: 2017-04-06 18:57 UTC by thomas
Modified: 2017-06-09 20:27 UTC (History)
7 users (show)

Tags: 15.1R
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 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:
Status:
VERIFIED FIXED

Description thomas 2017-04-06 18:57:05 UTC
Sinde I updated today to the latest VS version I have repeated crashes when switching from Android to my iOS Project. Especially when I try to access the iOS Appication settings of the projecte propertoes VS restarts.

This is the IDE Log which contains some exceptions. I checked the named Entitlements.plist is there and accessible

Actually there are two different exceptions I just realized:

Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.4.0.34-d15-1+3f99c5a
Xamarin.VisualStudio.Activation.AccountManager|Information|0|VS2016 Community
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using iOS Community
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using Android Community
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Warning|0|Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject|Error|0|Error HRESULT E_FAIL has been returned from a call to a COM component.
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
   at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectBase.GetGuidProperty(UInt32 itemId, Int32 propId)
   at Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.GetGuidProperty(UInt32 itemId, Int32 propId) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.Android\ProjectSystem\MonoAndroidFlavoredProject.cs:line 335
Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject|Error|0|Error HRESULT E_FAIL has been returned from a call to a COM component.
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
   at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectBase.GetGuidProperty(UInt32 itemId, Int32 propId)
   at Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.GetGuidProperty(UInt32 itemId, Int32 propId) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.Android\ProjectSystem\MonoAndroidFlavoredProject.cs:line 335
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|Solution loaded: 'JistTV'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.Droid\JistTV.Droid.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\JistTV.iOS.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.APITester\JistTV.APITester.csproj'
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from DisconnectedState to SshConnectingState on Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting connection to Mac Mac-mini.local....
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Broker 4.4.0.34 in port 50122...
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from SshConnectingState to SshConnectedState on Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Connection successfully established with the Mac Mac-mini.local.:50122
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from SshConnectedState to AgentsStartingState on Mac-mini.local. (192.168.178.51)
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Starting agents on Mac Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Agent Build 4.4.0.34...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Agent IDB 4.4.0.34...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent Build 4.4.0.34 is running
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent IDB 4.4.0.34 is running
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from AgentsStartingState to ConnectedState on Mac-mini.local. (192.168.178.51)
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Connected to the Mac Mac-mini.local. (192.168.178.51) with Full support.
Xamarin.VisualStudio.IOS.Messaging.MacServer|Warning|0|There is a mismatch between the installed Xamarin.iOS (version 10.8) on the Mac Mac-mini.local. (192.168.178.51) and the local Xamarin.iOS (version 10.8.0.174). While this may not be an issue, it might cause unexpected behaviors. When applying updates, make sure to keep both the Mac and Windows in sync.
Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel|Warning|0|Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
System.UnauthorizedAccessException: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Xamarin.MacDev.PObject.Save(String filename, Boolean atomic, Boolean binary)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.Save() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 377
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsChanged() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 198
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.cbEnableEntitlements_CheckedChanged(Object sender, EventArgs e) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 336
Xamarin.VisualStudio.UnhandledExceptionsManager|Error|0|An unhandled error occurred. Details: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.

System.UnauthorizedAccessException: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Xamarin.MacDev.PObject.Save(String filename, Boolean atomic, Boolean binary)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.Save() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 377
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsChanged() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 198
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.OnEntitlementsPanelLoad(Object sender, EventArgs e) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 212
   at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
   at System.Windows.Forms.UserControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.UserControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



And

Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin|Information|0|Xamarin - 4.4.0.34-d15-1+3f99c5a
Xamarin.VisualStudio.Activation.AccountManager|Information|0|VS2016 Community
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for iOS
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using iOS Community
Xamarin.VisualStudio.ActivationManager|Information|0|No license found for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Running license sync for Android
Xamarin.VisualStudio.ActivationManager|Information|0|Not logged in, using Android Community
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage|Warning|0|Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.TastyPackage|Information|0|Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage|Information|0|Initialization finished
Xamarin.VisualStudio.Android.XamarinAndroidPackage|Warning|0|Initializing Xamarin.VisualStudio.Android.XamarinAndroidPackage
Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject|Error|0|Error HRESULT E_FAIL has been returned from a call to a COM component.
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
   at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectBase.GetGuidProperty(UInt32 itemId, Int32 propId)
   at Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.GetGuidProperty(UInt32 itemId, Int32 propId) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.Android\ProjectSystem\MonoAndroidFlavoredProject.cs:line 335
Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject|Error|0|Error HRESULT E_FAIL has been returned from a call to a COM component.
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
   at Microsoft.VisualStudio.ErrorHandler.ThrowOnFailure(Int32 hr, Int32[] expectedHRFailure)
   at Microsoft.VisualStudio.Shell.Flavor.FlavoredProjectBase.GetGuidProperty(UInt32 itemId, Int32 propId)
   at Xamarin.VisualStudio.Android.MonoAndroidFlavoredProject.GetGuidProperty(UInt32 itemId, Int32 propId) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.Android\ProjectSystem\MonoAndroidFlavoredProject.cs:line 335
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|Solution loaded: 'JistTV'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.Droid\JistTV.Droid.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\JistTV.iOS.csproj'
Xamarin.VisualStudio.ProjectFixerRunner|Information|0|running fixup on project 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.APITester\JistTV.APITester.csproj'
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from DisconnectedState to SshConnectingState on Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting connection to Mac Mac-mini.local....
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Broker 4.4.0.34 in port 50122...
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from SshConnectingState to SshConnectedState on Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Connection successfully established with the Mac Mac-mini.local.:50122
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from SshConnectedState to AgentsStartingState on Mac-mini.local. (192.168.178.51)
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Starting agents on Mac Mac-mini.local. (192.168.178.51)
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Agent Build 4.4.0.34...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Agent IDB 4.4.0.34...
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent Build 4.4.0.34 is running
Xamarin.Messaging.Ssh.MessagingService|Information|0|Agent IDB 4.4.0.34 is running
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Server State transition from AgentsStartingState to ConnectedState on Mac-mini.local. (192.168.178.51)
Xamarin.VisualStudio.Remote.State.ServerStateContext|Information|0|Connected to the Mac Mac-mini.local. (192.168.178.51) with Full support.
Xamarin.VisualStudio.IOS.Messaging.MacServer|Warning|0|There is a mismatch between the installed Xamarin.iOS (version 10.8) on the Mac Mac-mini.local. (192.168.178.51) and the local Xamarin.iOS (version 10.8.0.174). While this may not be an issue, it might cause unexpected behaviors. When applying updates, make sure to keep both the Mac and Windows in sync.
Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel|Warning|0|Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
System.UnauthorizedAccessException: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Xamarin.MacDev.PObject.Save(String filename, Boolean atomic, Boolean binary)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.Save() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 377
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsChanged() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 198
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.cbEnableEntitlements_CheckedChanged(Object sender, EventArgs e) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 336
Xamarin.VisualStudio.UnhandledExceptionsManager|Error|0|An unhandled error occurred. Details: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.

System.UnauthorizedAccessException: Access to the path 'C:\Entwicklung\Apps\JistTV\Ankhor\slicenow\application\JistTV\JistTV\JistTV.iOS\Entitlements.plist' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
   at Xamarin.MacDev.PObject.Save(String filename, Boolean atomic, Boolean binary)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.Save() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 377
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsChanged() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 198
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.OnEntitlementsPanelLoad(Object sender, EventArgs e) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 212
   at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
   at System.Windows.Forms.UserControl.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.UserControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
Comment 1 Daniel Cazzulino 2017-04-06 19:25:55 UTC
Are you using VSTS source control? Could you verify that the entitlements isn't readonly on disk?
Comment 2 thomas 2017-04-06 19:33:29 UTC
Yep, you are right, it was readonly, but before the today UPdate this wasn't a problem and should not crash VS.
Also why does VS unless I change something and save. And even then  it should just ask to oberride like with other write protected files
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-24 21:55:07 UTC
## Status update

Setting status back to NEW because the requested information was provided in Comment 2 that the file was indeed marked readonly (potentially by TFS source control or similar).
Comment 4 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-24 21:58:31 UTC
## Tallying additional reports for bookkeeping

2 users: https://forums.xamarin.com/discussion/93620 (2017-04-20, 2017-04-24)
Comment 5 Brendan Zagaeski (Xamarin Team, assistant) 2017-04-24 22:21:15 UTC
## Additional bookkeeping notes



### Suspected to be a regression or a problem with a new feature?

Yes.  Based on this Bug 54661 as well as the other user reports, this behavior appears to have changed in XamarinVS 4.4.0 (part of the 15.1 release) compared to the previous versions (the Cycle 9 release).



### Makes development (a) difficult, impossible, or potentially hazardous, (b) moderately inconvenient, or (c) mildly inconvenient for users?

(b) It is possible to work around the issue by ensuring the Entitlements.plist is writable (rather than readonly), for example by checking the file out for changes in TFS, but users would have to spend some time searching to find that solution based on the error message since the error message itself "Access to the path ... is denied" is fairly generic.  Additionally, the error condition causes Visual Studio to _crash_ rather than failing in some more "gentle" way such as showing an error dialog.
Comment 6 Ashley Gazich [MSFT] 2017-04-24 22:45:58 UTC
*** Bug 55388 has been marked as a duplicate of this bug. ***
Comment 7 Emanuel 2017-06-08 15:09:58 UTC
This issue was fixed as part of the revamp of the iOS Property Pages, Manifest and Entitlements editors.
Comment 8 Brendan Zagaeski (Xamarin Team, assistant) 2017-06-09 20:27:45 UTC
## Verification status: verified no longer reproducible in XamarinVS 4.5

GOOD: XamarinVS 4.6.0.234 (c7d9b1e) [*]
GOOD: XamarinVS 4.5.0.476 (1be4f0c)
BAD:  XamarinVS 4.4.0.34  (3f99c5a)

In XamarinVS 4.5 and higher, due to the property pages redesign, the "iOS Application" tab no longer exists in the project properties.  I also checked that none of the other tabs in the project properties or any of the tabs in any of the editors (from "Open With...") for the Info.plist the Entitlements.plist hit a crash in this scenario.

[*] Un-published development build.




## Steps followed to test

1. Create a new "Visual C# > iOS > iPhone > Single View App (iPhone)" project.

2. If you Visual Studio currently has a remote Mac saved for Xamarin.iOS, use the dialog to "Forget this Mac".

3. Quit Visual Studio.

4. In Explorer (outside of Visual Studio), right click the Entitlements.plist file, select "Properties", enable the "Read-only" attribute, and click "OK".

5. Open the solution again in Visual Studio.  Do _not_ connect to the remote Mac when prompted.

6. Open the project properties and navigate to the "iOS Application" tab.




## BAD Results with XamarinVS 4.4.0

Visual Studio crashes due to an unhandled exception on the UI thread.



### Excerpt from the *Ide.log file

> Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel|Warning|0|Access to the path 'C:\source\SingleViewIphone1\SingleViewIphone1\Entitlements.plist' is denied.
> System.UnauthorizedAccessException: Access to the path 'C:\source\SingleViewIphone1\SingleViewIphone1\Entitlements.plist' is denied.
>    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
>    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
>    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access)
>    at Xamarin.MacDev.PObject.Save(String filename, Boolean atomic, Boolean binary)
>    at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.Save() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 377
>    at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsChanged() in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 198
>    at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.cbEnableEntitlements_CheckedChanged(Object sender, EventArgs e) in C:\d\lanes\4471\3f99c5a7\source\xamarinvs\src\Core\VisualStudio.IOS\Widgets\EntitlementsPanel.cs:line 336



## Additional testing environment info (brief)



### Windows

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.7.02046

Windows 10 (64-bit) Version 1703 (OS Build 15063.332)
US English locale, US Eastern time zone

 

### Mac

Mono 5.0.1.1 (2017-02/5077205)

Xcode 8.3, Build version 8E162
macOS 10.12.4
US English locale, US Eastern time zone