Bug 20288 - 'System.InvalidOperationException' shown on selecting invalid file for 'Add existing Projects'
Summary: 'System.InvalidOperationException' shown on selecting invalid file for 'Add e...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 5.0
Hardware: All All
: Normal normal
Target Milestone: 5.2
Assignee: Marius Ungureanu
URL:
Depends on:
Blocks:
 
Reported: 2014-06-03 03:32 UTC by Prashant manu
Modified: 2014-07-04 12:59 UTC (History)
5 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 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:
Status:
VERIFIED FIXED

Description Prashant manu 2014-06-03 03:32:42 UTC
Steps to reproduce:
1. Open XS and create a solution
2. Right click over solution name and select 'Add existing Projects' option.
3. Brose and select any invalid file. for ex image

Actual Result:
'System.InvalidOperationException' shown on selecting invalid file for 'Add existing Projects'.

Note: It is working fine on MAC.

Expected Result:
User should not be allowed to select invalid file while adding existing projects.

Screencast: http://www.screencast.com/t/gOpPf9liYsTK

Supplement Info:
Error details: https://gist.github.com/saurabh360/7ad2c246cb90f6a5236e

Regression status: REGRESSION It is working fine with stable XS 5.0 (build 878)

Environment Info:
Xamarin Studio Version 5.1 (build 322)
Git revision: e79f17166d197fa4e7b2750c623d3eed3209aa98
Xamarin addins: b68a34ef2fc4c46b045dc38e26fb199bfe1b201d
Comment 1 Lluis Sanchez 2014-06-03 09:25:21 UTC
Looks like the file type filter is not being applied in the file selector.
Comment 2 Marius Ungureanu 2014-06-05 07:55:55 UTC
Fixed in master.
Comment 3 Prashant manu 2014-06-06 02:12:55 UTC
Now if select Add> Add Existing Project , then at Open dialog by default 'Project files' filter appears selected and is working fine.

However if we change it to 'All Files' and select any invalid file we are still getting same error. It occurs on both MAC and win.

Screencast: http://screencast.com/t/A394ZwgSr

Environment Info: 
Xamarin Studio Version 5.1 (build 397)
Git revision: 2637131981bd7be2d4b57ad22cf3517786fdab28
Xamarin addins: 2c39ca1ce8e771ebfd5bfb8cf699d1f2cfd9a4ac
Comment 4 Marius Ungureanu 2014-06-06 05:07:52 UTC
Lluis, should we modify Add Existing Project so it doesn't throw but just say it's invalid?
Comment 5 Lluis Sanchez 2014-06-09 04:38:49 UTC
We could show a better message.
Comment 6 Lluis Sanchez 2014-06-09 06:54:24 UTC
I closed by mistake.
Comment 7 Lluis Sanchez 2014-06-09 06:54:46 UTC
Not a major issue, to be fixed in 5.2
Comment 8 Lluis Sanchez 2014-07-02 11:42:43 UTC
Fixed in 5.2
Comment 9 Mohit Kheterpal 2014-07-04 12:59:47 UTC
I have checked this issue with XS 5.2 (build 179) and this issue does not exist as shown in screencast : http://screencast.com/t/AJd7TGvs

Hence closing this issue. 

Environment info :
=== Xamarin Studio ===

Version 5.2 (build 179)
Installation UUID: 449f40dd-b3f1-4028-9a6b-cca0d1a2307d
Runtime:
	Mono 3.4.0 ((no/954ed3c)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000214

=== Xamarin.Android ===

Version: 4.12.6 (Trial Edition)
Android SDK: /Users/360logicaxamarinmacmini/Desktop/android-sdk-macosx
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 5.1.1 (5085)
Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.6.17 (Trial Edition)
Hash: 762ebac
Branch: 
Build date: 2014-07-03 15:53:37-0400

=== Xamarin.Mac ===

Version: 1.8.1.0

=== Build Information ===

Release ID: 502000179
Git revision: 3dbcdf64de0826aa76b5f108ae80644511b4e587
Build date: 2014-07-03 17:37:41-04
Xamarin addins: 116ce67c67d933645f95fb370690487b18b8624e

=== Operating System ===

Mac OS X 10.8.4
Darwin 360Logicas-Mac-mini.local 12.4.0 Darwin Kernel Version 12.4.0
    Sun Mar 10 18:01:10 PDT 2013
    root:xnu-2050.24.6~1/RELEASE_X86_64 x86_64