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.
Created attachment 2473 [details]
Build output with --linkskip=IOSTChart -v -v -v in additional monotouch arguments
I am getting a strange error when building my app for debug deployment to my test device. This does not happen when compiling for the simulator.
The specific error is: error MT2002: Can not resolve reference:
System.Void MonoTouch.Foundation.NSTimer::.ctor() I've searched for this and found a bunch of similar error MT2002's but nothing has resolved this issue.
I am running the MonoDevelop 188.8.131.52 and MonoTouch 5.4.0.
I have posted about this to the MonoTouch forums. Sebastien was trying to help me and suggested that it was a 3rd party DLL that was causing the problem. I have one (IOSTChart.dll) from Steema for charting purposes. Sebastien had suggested that I use the "--linkskip=IOSTChart" in the additional monotouch arguments field. Trying that did not remove the build error.
The only other references I have are:
Sebastien requested that I submit this bug report and include the build output (attached).
Please let me know if you need more information to make sense of this. Thank you!
IOSTChart does refer to the broken NSTimer ctor. Sadly "linkskip" won't be enough (you can remove it from your options) as, by default, the linker will need to process the IOSTChart assembly anyway.
Two things you can try (quickly):
1. Use "Link all assemblies". That will "likely" remove the code that use the invalid NSTimer. However if your application use (even indirectly) reflection you might run into other issues.
2. Use "Don't link". That will not run the linker but your application will be *much* larger (and will take more time to compile and upload to devices).
In the meantime I'll re-introduce the broken .ctor in a way that people can't use in (in new code) but make it available (as a symbol) for existing assembly binaries. I'll attach an hotfix (with instructions) once I tested it.
Created attachment 2476 [details]
To use the attached assembly (on top of MonoTouch 5.4.0) do:
1) backup your /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll and /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb files
2) copy the attached file to /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll
3) remove the /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll.mdb symbols (they won't match anymore)
4) clean, rebuild and test your application
Once you update to 5.4.1 the fix will be part of MonoTouch and this won't be required anymore.
Thank you Sebastien. Will let you know the results when I have this hotfix in place.
Ok, I feel like a complete tool, but can you give me some instruction on how to find those files? I'm a windows user who is still very much a Mac newbie. Sorry and thanks!
Nevermind... found it. Thanks.
YES! It works! Thank you Sebastien!
Sorry it was lunch time - but I'm glad you got it working. Have fun!