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.
The attached binding project always fails with an exception when building.
**Steps to Reproduce:**
1. Download the provided sample.
2. Do a Rebuild on the project.
> Error CS0246: The type or namespace name `BaseWrapper' could not be found. Are you missing an assembly reference? (CS0246)
**Build Date & Platform:**
After a failed Rebuild, if you choose to simply Build the project it will succeed. However, the resulting DLL has no code in it.
BaseWrapper is a recent addition (to share more code across protocols implementations). Maybe it's missing a `using` clause ?!?
@Alex can you have a look at the sample ?
Hello I've tried the attached sample and I can compile it just fine using X.I 7.2.6 here is my version information, can you spot something different in your system?
=== Xamarin Studio ===
Version 5.2.1 (build 1)
Installation UUID: 4b03e950-733c-4da6-8bee-bdca7529a49c
Mono 3.6.0 ((no/f540f8a)
GTK+ 2.24.23 (Raleigh theme)
Package version: 306000039
=== Apple Developer Tools ===
Xcode 5.1.1 (5085)
=== Xamarin.iOS ===
Version: 22.214.171.124 (Business Edition)
Build date: 2014-08-01 15:27:48-0400
I have the same installed, and I still get the error. Are you doing a Rebuild (Or clean/build)?
Also, check if the DLL being made actually has code in it.
Yup I have done clean/Rebuild and also nuked bin and obj directories just to make sure. Dll has everything inside.
Odd. Here is what I see doing _the same_:
@John please show us the generated code (that error occurs on line 153, gist the whole file) and the build output (it's not visible in your screencase).
There must be a difference somewhere and that difference should point us to what's going on :-)
What's /reference:/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll_backup.dll ?
Can you attach that file ?
Created attachment 7687 [details]
I am not sure where that file came from, but deleting it fixes my problem!
@John was that a bug for a customer ? or did it just happen to you ? (this looks like you applied a manual hotfix and kept a backup of the original monotouch.dll)
The problem is that monotouch.dll_backup.dll file is older than the 7.2.6 monotouch, i.e.
> 126.96.36.199; git-rev-head:fc6f56ba351c076834ad47a8b817ae3993c285e3; git-branch:(detached
and does not have the (new) BaseWrapper type that btouch-generated bindings requires. So it's kind of invalid, except that it expose two issues in the binding task -> Jeff
a. Do you have any clue why the binding task would pick up a monotouch.dll_backup.dll file ? (when present) instead of monotouch.dll ? (try copying the attached assembly to your system to duplicate).
b. It seems (see screencasts) the rebuilding the bindings a second time results in in empty/invalid assembly.
It was on my machine, and you are correct. I applied a hotfix a few months ago and forgot about that file. I guess I will make my backup naming convention more cryptic. ;)
Thanks for looking at this!
This is a bug in the compiler, I think. The BTouchTask passes the BaseLibDll directory path to btouch as the argument to "/lib:"
btouch then passes that directory to smcs as the directory search path for the assemblies.
smcs somehow decides to use monotouch.dll_backup.dll
I haven't tracked it any further.
Issue is not within XI