Bug 5192 - System.Threading.LockRecursionException is defined multiple times
Summary: System.Threading.LockRecursionException is defined multiple times
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: 2.10.x
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2012-05-20 16:53 UTC by tome
Modified: 2012-05-23 04:33 UTC (History)
2 users (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 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 tome 2012-05-20 16:53:48 UTC
There are 2 definitions of the System.Threading.LockRecursionException in 2 assemblies.
The first is in mscorlib.dll, and the second is in System.Core.dll.

And now this multiple definition invokes an error in compile time with referencing that type.
code snippet is here;
void RecursionLockTest ()
	var rwLock = new ReaderWriterLockSlim (LockRecursionPolicy.NoRecursion);
	rwLock.EnterReadLock ();
	try {
		try {
			rwLock.EnterReadLock ();
		catch (LockRecursionException) { // CS0433 (confirmed on Mono 2.10.9, MonoTouch 5.2.11)
			Assert.True (true);
	finally {
		rwLock.ExitReadLock ();

Then compile time error message is here;
test.cs: Error CS0433: The imported type `System.Threading.LockRecursionException' is defined multiple times (CS0433) (net.tomesoft.MonoTouchUtilityTests)
Comment 1 Marek Safar 2012-05-23 04:33:05 UTC
Fixed in mono master