Bug 20529 - Binding an objective-c property block doesn't compile anymore
Summary: Binding an objective-c property block doesn't compile anymore
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 7.0.0.x
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-06-11 10:14 UTC by Alexandre Pepin
Modified: 2016-09-23 16:59 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Sample project (44.72 KB, application/zip)
2014-06-11 10:14 UTC, Alexandre Pepin
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description Alexandre Pepin 2014-06-11 10:14:09 UTC
Since I upgraded to Xamarin 3, binding an objective-c property block doesn't compile anymore. 

I get the following error in the file Trampolines.g.cs : "<path>/BindingTests/BindingTests/obj/Debug/ios/ObjCRuntime/Trampolines.g.cs(36,36): Error CS1503: Argument `#1' cannot convert `string' expression to type `System.IntPtr' (CS1503) (BindingTests)"

See my attached sample
Comment 1 Alexandre Pepin 2014-06-11 10:14:26 UTC
Created attachment 7039 [details]
Sample project
Comment 2 Atin 2014-06-11 14:25:03 UTC
Today, I have checked this issue with:
XS 5.0(build 878)
X.iOS 7.2.3-39
Mavericks 10.9.2

I am successfully able to build attached sample successfully, without any error. Could you please provide XS info Using Xamarin studio->About Xamarin studio->Show details and

Diagnostic build output Using Xamarin studio->Preferences->Build->Log verbosity->Select Diagnostic from dropdown

Now Build the application then attached the Build output.

Thanks
Comment 3 Alexandre Pepin 2014-06-11 15:00:06 UTC
My versions :
Xamarin Studio
Version 5.0.1 (build 3)
Installation UUID: d0822cff-209f-4629-8060-b9dab16951c4
Runtime:
	Mono 3.4.0 ((no/c3fc3ba)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 304000204

Apple Developer Tools
Xcode 5.1.1 (5085)
Build 5B1008

Xamarin.Mac
Xamarin.Mac: Not Installed

Xamarin.Android
Version: 4.12.4 (Trial Edition)
Android SDK: /Users/alexandre.pepin/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)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Xamarin.iOS
Version: 7.2.3.39 (Business Edition)
Hash: fc6f56b
Branch: 
Build date: 2014-05-19 19:10:29-0400

Build Information
Release ID: 500010003
Git revision: f94ee866936d25105704eb63728ad5a981eda0a4
Build date: 2014-06-04 12:19:12-04
Xamarin addins: 1a6044e8321ea07e03a56b5381951686c82fed8b

Operating System
Mac OS X 10.9.3
Darwin DXMAC10.local 13.2.0 Darwin Kernel Version 13.2.0
    Thu Apr 17 23:03:13 PDT 2014
    root:xnu-2422.100.13~1/RELEASE_X86_64 x86_64
Comment 4 Alexandre Pepin 2014-06-11 15:00:26 UTC
It's seems it is the rebuild command that doesn't work. Only doing build works

To reproduce : try right clicking on projet and Rebuild. It also doesn't work right clicking on project and doing a clean and after a build. But doing a second build works after that. Really wierd
Comment 5 Rolf Bjarne Kvinge [MSFT] 2014-09-08 12:56:20 UTC
I can reproduce.

It looks like the generated code is incorrect.
Comment 6 Rolf Bjarne Kvinge [MSFT] 2016-09-23 16:59:26 UTC
This works now.