Bug 25462 - The type 'IDisposable' is required here
Summary: The type 'IDisposable' is required here
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: F# Add-in ()
Version: 5.5
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: master
Assignee: Dave Thomas
Depends on:
Reported: 2014-12-17 04:40 UTC by henrik
Modified: 2015-06-12 10:12 UTC (History)
2 users (show)

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

screenshot of bug (98.55 KB, image/png)
2014-12-17 04:40 UTC, henrik
a zip file with the code that triggers the error (98.36 KB, application/zip)
2014-12-17 04:41 UTC, henrik
another error that actually fails compilation (162.08 KB, image/png)
2014-12-17 07:02 UTC, henrik

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 henrik 2014-12-17 04:40:12 UTC
Created attachment 9099 [details]
screenshot of bug

When using the latest Xamarin Studio to write code, and adding the package SQLite.Net.Platform.Generic to the F# Console Application, and trying to compile, everything works fine.

But from the Syntax Completion buffer/editor, everything that 'is-a' thing from the portable class library, such as types inheriting from the library, are underlined with a squiggly which states;

    The type 'IDisposable' is required here and is unavailable. You must add reference to 'System.Runtime, ... etc'

See screenshot.

Latest stable everything.

Expected behaviour; errors shown in IDE should equal those thrown/given by the compiler.
Comment 1 henrik 2014-12-17 04:40:43 UTC
Adding repro solution, open 'sqlite-net-spike' project to see.
Comment 2 henrik 2014-12-17 04:41:21 UTC
Created attachment 9100 [details]
a zip file with the code that triggers the error
Comment 3 Dave Thomas 2014-12-17 05:58:30 UTC
Hi thats a current known issue see: 

Comment 4 henrik 2014-12-17 07:02:52 UTC
Created attachment 9101 [details]
another error that actually fails compilation

I found another error case; using Instant as a type of a field causes the compiler to barf. Can't find out why.
Comment 5 henrik 2014-12-17 07:04:25 UTC
For the type that was locally declared, using Instant; it turns out that the problem was that I needed to reference System.Xml, but that was never stated anywhere; it was a guess from previous interaction experiences with NodaTime.
Comment 6 Dave Thomas 2014-12-17 07:07:11 UTC
All PCL reference assemblies should be implicitly referenced during build, that would include System.Xml.  That doesn't happen during type checking though (yet)
Comment 7 henrik 2014-12-17 07:08:18 UTC
Can you please update the issue you linked with instructions on how to fix it?
Comment 8 Dave Thomas 2015-06-12 10:12:46 UTC
This is now fixed in the XS 6.0