Bug 13431 - The Class InvalidDataException is not found at compile time.
Summary: The Class InvalidDataException is not found at compile time.
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2013-07-24 06:27 UTC by Peter Hultqvist
Modified: 2013-07-24 10:11 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Screenshot of test project (72.58 KB, image/png)
2013-07-24 06:27 UTC, Peter Hultqvist
XamarinStudio log file (3.71 KB, application/octet-stream)
2013-07-24 06:29 UTC, Peter Hultqvist
IDE log (6.61 KB, application/octet-stream)
2013-07-24 06:29 UTC, Peter Hultqvist

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 GitHub or 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:

Description Peter Hultqvist 2013-07-24 06:27:41 UTC
Created attachment 4410 [details]
Screenshot of test project

The Class InvalidDataException is not found when compiling.

 * Formated harddrive
 * Installed Windows 8 from DVD
 * Installed Xamarin Studio, Android
 * Create new Android Project
 * Add the line: throw new InvalidDataException
 * Right click the red text and choose: "Reference System and use 'using System.IO"
 * Compile, fail

Error message:
Error CS0246: Det gick inte att hitta typ- eller namnområdesnamnet InvalidDataException (saknas ett using-direktiv eller en sammansättningsreferens?) (CS0246) (ytefd)

The same error occurs in all our old Project that we imported using git into the new machine, so no previously compiled dlls are included.

I also noted that System was already referenced in the Project and Another system was added as seen in the screenshot.
Removing one of them or both and then redo the Resolve step did not help.

This is all running on the Stable channel, currently Xamarin Studio 4.0.9, not sure how to get the other versions, next beta for Xamarin.Android is 4.8.0 so the current one is probably below.

Previous system that I moved from was running the stable channel in a Windows 8 virtual guest.

I will try the beta and report back.
Comment 1 Peter Hultqvist 2013-07-24 06:29:34 UTC
Created attachment 4411 [details]
XamarinStudio log file
Comment 2 Peter Hultqvist 2013-07-24 06:29:56 UTC
Created attachment 4412 [details]
IDE log
Comment 3 Peter Hultqvist 2013-07-24 06:31:15 UTC
If I open the System reference in the Assembly browers no System.IO is found, only System.IO.Compression
Comment 4 Peter Hultqvist 2013-07-24 06:36:38 UTC
Just updated to the Beta channel and problem is no longer there.

Xamarin.Android 4.8.0
Comment 5 Jonathan Pryor 2013-07-24 10:11:51 UTC
System.IO.InvalidDataException does not exist in Xamarin.Android v4.6.x. It requires Xamarin.Android 4.7.x or 4.8.0.