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.
In MSDN, System.Diagnostics.Tracing.EventSource.WriteEvent has 14 overloads, but Mono implemented only 4.
This causes the following error:
Missing method System.Diagnostics.Tracing.EventSource::WriteEvent(int,object) in assembly /usr/local/lib/mono/4.5/mscorlib.dll, referenced in assembly /home/azyobuzin/foobar.dll
Exception has been thrown by the target of an invocation.
My provisional fix is here:
Mono JIT compiler version 3.12.0 ((detached/de2f33f 2015年 2月 24日 火曜日 01:39:43 JST)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
LLVM: supported, not enabled.
## Additional context for the Mono developer team
Although at first glance it might seem odd to add _empty_ method overloads that contain no implementation, adding these empty overloads will be helpful in a few scenarios. In addition to preventing the error mentioned in comment 0, these overloads will allow Xamarin.iOS and Xamarin.Android customers to use the linker with applications that reference the default version of the "Microsoft TPL Dataflow" NuGet package (see ). Apparently the code paths in the Microsoft TPL Dataflow library that reference "System.Diagnostics.Tracing" are rarely used (or fail silently and do not break the primary intended behaviors of the library).
In short, I think it would be helpful to add these empty overloads. To help keep this bug narrowly focused, I have also filed a separate enhancement request (Bug 34890) to track any additional work that the Mono team might eventually do to implement _non-empty_ methods in the "System.Diagnostics.Tracing" namespace.
## Related Xamarin.Android and Xamarin.iOS linker errors (for reference)
### Linker error message on Xamarin.Android
> Error executing task LinkAssemblies: error XA2006: Reference to metadata item
> (defined in 'System.Threading.Tasks.Dataflow, Version=188.8.131.52,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') from
> 'System.Threading.Tasks.Dataflow, Version=184.108.40.206, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a' could not be resolved.
### Linker error message on Xamarin.iOS
> MTOUCH: error MT2002: Failed to resolve "System.Void
> reference from "System.Diagnostics.Tracing, Version=220.127.116.11, Culture=neutral,
*** Bug 34610 has been marked as a duplicate of this bug. ***
## Status update for any users CC'd on the bug
These empty overloads have now been added in the "master" branch of Mono:
### Those new changes are _not_ yet included in Xamarin.iOS or Xamarin.Android
The latest "Cycle 6 – Service Release 1" builds of Xamarin.iOS or Xamarin.Android are based on Mono commit 996df3c. That commit still uses the older version of `EventSource` . The new code in the "master" branch will in theory be included into Xamarin.Android and Xamarin.iOS the next time they are "branched from master," which would by default happen for the upcoming "Cycle 7" feature release. The (very rough) initial estimate is that the first previews for Cycle 7 might be available in February.
This will make it into C7 as per comment 5, but not C6SR2. Updating milestone.
I verified the commit is in the C7 branch (mono-4.4.0-branch) now.
I have checked this issue with latest C7 build:
And observing the same reported behavior mention on bug description.
System.Diagnostics.Tracing.EventSource.WriteEvent has 14 overloads, but Mono implemented only 4.
Here is the screencast for the same: http://www.screencast.com/t/64vnpAhl8i
Hence reopening this issue.
It looks like the contracts (reference assemblies) weren't updated when the commit was merged, that's why you're seeing the missing overloads in the Assembly Browser. They should be there at runtime.
@Marek: what's the process for regenerating the reference assemblies?
We fixed that for .net 4.6 which is our default target framework. Please test with that.
The api was not updated for previous version 4.0 & 4.5 and won't be that late in the cycle especially when the new code does nothing.
I have checked this issue with latest C7 build:
I have checked this after changing the target framework .net framework 4.6. Now I am able to see all overloads of System.Diagnostics.Tracing.EventSource.WriteEvent.
Here is the screencast for the same: http://www.screencast.com/t/DmfkjV2lSci
Hence closing this issue.