Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
As title. For 2.10.5 and 2.10.6 at least, the .NET 4.0 System.Security assembly doesn't contain a Dispose() method in its HashAlgorithm class.
HashAlgorithm.cs does contain the code, guarded by a #if NET_4_0 check but the code hasn't been included in the build output.
The HashAlgorithm type is in mscorlib.dll (not System.Security.dll) and does not publicly expose Dispose because this, like a lot of 4.0 changes, are only available in Mono 2.11+ (or if you build from source).
note: it's not in the source code for HashAlgorithm.cs in the 'mono-2-10' branch - you're probably looking at the source code for 'master'.
I'll backport 940bdeca94be89d2423165e741165a4832b8e724 (it occurs in several types, not just HashAlgorithm) to mono-2-10 for future releases. In the mean time a workaround is to cast to IDisposable before calling Dispose, e.g.
(hash as IDisposable).Dispose();
backported in mono-2-10 : 6e7c741e825596b8cbaf00787d0c49eccf246a7c