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 for Bug 19234 on
Developer Community or GitHub if you have new
information to add and do not yet see a matching new report.
If the latest results still closely match this report, you can use the
In special cases on GitHub you might also want the comments:
GitHub Markdown with public comments
Created attachment 6635 [details]
Screen shot of highlighted errors.
I'm working on building an iOS binding project to try it out and experience the process. The syntax highlighting shows a lot of errors of the type "error CS0103: The name <name> does not appear in the current context". Autocomplete doesn't work for any of the attributes showing errors either.
Building the project succeeds with no errors, and when referencing the resulting dll file I'm able to successfully access and autocomplete all of the methods/properties defined in the ApiDefinitions file.
Version 5.0 (build 725)
Installation UUID: 3d34ed17-120d-4fb8-9987-2ad2015aee3e
Mono 3.4.0 ((no/585aa54)
GTK+ 2.24.23 (Raleigh theme)
Package version: 304000201
Apple Developer Tools
Xcode 5.1.1 (5085)
Version: 4.12.4 (Business Edition)
Android SDK: /Users/Tim/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
4.0 (API level 14)
4.0.3 (API level 15)
4.3 (API level 18)
4.4 (API level 19)
Java SDK: /usr
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Version: 220.127.116.11 (Business Edition)
Build date: 2014-04-21 16:24:28-0400
Xamarin.Mac: Not Installed
Release ID: 500000725
Git revision: 1c04181c9318b2beb490053d013131ea9ccca2d2
Build date: 2014-04-22 15:37:35-04
Xamarin addins: df1b37d137609c2d5a731772a7a34bd0701860ec
Mac OS X 10.9.2
Darwin Macbook.local 13.1.0 Darwin Kernel Version 13.1.0
Thu Jan 16 19:40:37 PST 2014
I tried to reproduce this issue and I am able to reproduce this issue
Steps to reproduce:
1. Create a iOS Binding project
2. Paste the following code in “ApiDefinition.cs” file
[BaseType (typeof (NSObject))]
string Echo(string message);
[Static , Export("test:")]
string Test(string test);
int Add(int x, int y);
int Multiply(int x, int y);
2. Build the the “iOSBindingProject”
3. Add an “iPhone SingleViewApplication” in the solution.
4. Add the reference of “iOS Binding” project
5. Now I can access the methods of “ApiDefinition.cs” file
I observed that when in “iOSBindingProject when I hover the curser over the highlighting syntax it shows a errors i.e. “CS0103: The name <name> does not appear in the current context” and also autocomplete doesn't work for any of the attributes showing errors either. I am able to build project successfully.
I have also checked that when I add the “iOSBindingProject” reference to the project I am able to successfully access and autocomplete all of the methods/properties defined in the ApiDefinitions file.
Mac OS X 10.9.2
Xamarin Studio : 5.0 (build 784)
Release ID: 500000784
Git revision: ea367c9e829e7c627ec8927e8832df6a74390d61
Build date: 2014-04-29 09:48:53-04
Xamarin addins: 92dcfc8532a8c6d21783289c176417d7c17bf492
This is a consequence of the way binding projects work. They undergo a multi-pass compilation system:
1) cs files with the ObjcBindingApiDefinition and ObjcBindingCoreSource build actions are fed into btouch, which creates the actual binding files in an intermediate folder
2) The actual binding files are combined with the cs files with the Compile build acton to create the real binding assembly.
So the cs files in #1 aren't actually built referencing the assemblies the project references, they're built referencing btouch, and the C# completion engine doesn't understand this.
And the files in #2 are referencing types generated in #1, which are not available until the compile has take place.
This could all be fixed by some special casing but it's definitely nontrivial.
Bump. This is incredibly annoying.