Bug 23733 - Visual Studio crashes when Entitlements.plist checked into TFS
Summary: Visual Studio crashes when Entitlements.plist checked into TFS
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: 4.0.0 (C6)
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-10-10 04:36 UTC by Tomasz Cielecki
Modified: 2017-04-19 15:56 UTC (History)
8 users (show)

Tags:
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:
RESOLVED FIXED

Description Tomasz Cielecki 2014-10-10 04:36:21 UTC
When using TFS for version control, it known for having its files locked down when they are checked in. Opening the Info.plist file without having Entitlements.plist checked-out crashes Visual Studio without any error, until you look in the log burried in AppData.

Xamarin.VisualStudio.Shell.ShellPackage Error: 0 : [2014-10-10 10:24:13.5] Unhandled Exception
System.UnauthorizedAccessException: Access to the path 'C:\ENM\Main\src\prod\Mobile\SetupCompanion\SetupCompanion.Touch\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.PObjectContainer.Save(String filename, Boolean atomic, Boolean binary)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.CreateAndAddBlankEntitlements()
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.cbEnableEntitlements_CheckedChanged(Object sender, EventArgs e)
   at System.Windows.Forms.CheckBox.OnCheckedChanged(EventArgs e)
   at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
   at System.Windows.Forms.CheckBox.set_Checked(Boolean value)
   at Xamarin.VisualStudio.IOS.Widgets.EntitlementsPanel.EntitlementsPanel_Load(Object sender, EventArgs e)
   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)

Wouldn't it be a bit more graceful if you notified the user that the file is not accessible instead of just crashing VS?

Here is a screen recording of it happening: https://www.youtube.com/watch?v=ONC3W5Tyfto

Microsoft Visual Studio Ultimate 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   4.0.381.0 (cda47a4f438cef077d8f5c0eb79fb5df835c6b99)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   4.99.0.144 (af4cb1e950dcbc00c3d2c365b24efc1b9fb93671)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   8.2.0.0 (13fec5ef6bd1d2992ae58cc5147d0e3f988792ca)
Visual Studio extension to enable development for Xamarin.iOS.
Comment 1 Juan Marcelo Tondato 2014-10-16 11:02:45 UTC
Wrench: 2b92dc902ad03e52d0144aa83f5b610406934010
Commit: 16709ec15aaad2ac7b51da8fc2ad1e169039643b
Comment 2 Ian Ceicys 2014-11-11 11:08:04 UTC
This issue has been verified by QA and is fixed. Marking this bug as resolved.