Bug 13420 - Removing Component Causes InvalidOperationException
Summary: Removing Component Causes InvalidOperationException
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Component Store ()
Version: unspecified
Hardware: PC Mac OS
: Normal normal
Target Milestone: master
Assignee: Matt Ward
Depends on:
Reported: 2013-07-23 16:23 UTC by Anuj Bhatia
Modified: 2015-09-02 09:01 UTC (History)
1 user (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 Anuj Bhatia 2013-07-23 16:23:55 UTC
Removing Pixate from Existing Project does not gracefully fail.

System.InvalidOperationException: Cannot get libraries from incompatible component
  at Xamarin.Components.Ide.Component.GetLibrariesWithStatus () [0x00073] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:221 
  at Xamarin.Components.Ide.Component.ProjectHasAnyReferences () [0x00001] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:495 
  at Xamarin.Components.Ide.Component.AskAndRemoveFromProject (Xwt.WindowFrame parentWindow) [0x00018] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/Component.cs:230 
  at Xamarin.Components.Ide.ComponentCellView.RemoveFromProjectClicked (System.Object sender, Xwt.NavigateToUrlEventArgs e) [0x0000d] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/md-addins/Xamarin.Ide/Xamarin.Components.Ide/Components/ComponentManager/ComponentCellView.cs:142 
  at (wrapper delegate-invoke) System.EventHandler`1<Xwt.NavigateToUrlEventArgs>:invoke_void__this___object_TEventArgs (object,Xwt.NavigateToUrlEventArgs)
  at Xwt.LinkLabel.OnNavigateToUrl (Xwt.NavigateToUrlEventArgs e) [0x0000c] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/monodevelop/main/external/xwt/Xwt/Xwt/LinkLabel.cs:114 
  at Xwt.LinkLabel+WidgetBackendHost.OnNavigateToUrl (System.Uri uri) [0x00001] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/monodevelop/main/external/xwt/Xwt/Xwt/LinkLabel.cs:59 
  at Xwt.GtkBackend.LinkLabelBackend+<OpenLink>c__AnonStorey22.<>m__40 () [0x00012] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/monodevelop/main/external/xwt/Xwt.Gtk/Xwt.GtkBackend/LinkLabelBackend.cs:107 
  at Xwt.Engine.Toolkit.Invoke (System.Action a) [0x00007] in /Users/builder/data/lanes/monodevelop-lion-monodevelop-4.0.10-branch/f78b1117/source/monodevelop/main/external/xwt/Xwt/Xwt.Engine/Toolkit.cs:41 


Version Information:

=== Xamarin Studio ===

Version 4.0.10 (build 5)
Installation UUID: 0cf9a300-9f44-4604-a9bf-9608951c65d0
	Mono 3.1.2 ((no/71af847)
	GTK 2.24.20
	GTK# (
	Package version: 301020000

=== Apple Developer Tools ===

Xcode 4.6.3 (2068)
Build 4H1503

=== Xamarin.Android ===

Version: 4.8.0 (Business Edition)
Android SDK: /Users/abhatia/Library/Developer/Xamarin/android-sdk-mac_x86/
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
Java SDK: /usr
java version "1.6.0_51"
Java(TM) SE Runtime Environment (build 1.6.0_51-b11-457-11M4509)
Java HotSpot(TM) 64-Bit Server VM (build 20.51-b01-457, mixed mode)

=== Xamarin.iOS ===

Version: (Business Edition)
Hash: c9f7659
Build date: 2013-18-07 21:36:03-0400

=== Xamarin.Mac ===

Xamarin.Mac: 1.4.22

=== Build Information ===

Release ID: 400100005
Git revision: f78b1117e201b3890dce45559bc8995adc4005a2
Build date: 2013-07-15 16:16:13+0000
Xamarin addins: a158bb2e0120450d0d23a35a5d4cbc695947bcab

=== Operating System ===

Mac OS X 10.8.4
Darwin ABMacBookPro-3435.local 12.4.0 Darwin Kernel Version 12.4.0
    Wed May  1 17:57:12 PDT 2013
    root:xnu-2050.24.15~1/RELEASE_X86_64 x86_64
Comment 1 Matt Ward 2015-09-02 09:01:57 UTC
This looks like it has been fixed at some point in the past.

The "Cannot get libraries from incompatible component" error is thrown when the Component's lib directory does not contain any compatible assemblies. If the component is deleted or the lib directory is deleted then Xamarin Studio 5.9 will remove the component without throwing this error.

The code seems to have changed so that it now passes an extra argument to Component.GetLibrariesWithStatus () which indicates that the missing assemblies from the lib directory can be ignored and an empty list is now returned instead.