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
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.
Description of Problem:
Xamarin.IOS contains types with the OpenTK namespace (like OpenTK.Vector2, for example), which clashes when you're actually trying to use OpenTK in your project.
The only workaround seems to be using extern alias (which looks ugly, and also brings its own issues: https://bugzilla.xamarin.com/show_bug.cgi?id=52168).
Are you using your own build of OpenTK or the nuget package? If you are using your own build you could exclude those to avoid the clash. If you are using the nuget package then using the extern alias seems to be your best option.
Another option is that you can use the OpenTK dll we provide, if you double click on the references folder and click on packages you will see it, it is based on our fork (https://github.com/mono/opentk).
We do have those types borrowed from OpenTK because they are used by Xamarin.iOS dll and we did not want to bring the full OpenTK assembly (also not binding it to a specific version) in order to use them so we can't just remove them from the X.I assembly.
"Are you using your own build of OpenTK or the nuget package? If you are using your own build you could exclude those to avoid the clash."
I'm building from source (just because the nuget currently doesn't support ios & android), but will switch to nuget once they add those in. I don't want to work with a modified source.
"Another option is that you can use the OpenTK dll we provide"
No, it's out-of-date, the recommendation is to use the official OpenTK.
"so we can't just remove them from the X.I assembly."
Well, not remove them, but how about changing the namespace?
Hello again Tzach, we currently do not have plans to make this change since it would be a very big breaking one. The ideal fix is to have the iOS build of the custom OpenTK to refer to Xamarin.iOS.dll instead of including it’s own also our fork https://github.com/mono/opentk is public so anyone can contribute :)