Bug 46606 - Protocols_Delegates_Events sample does not build with xbuild
Summary: Protocols_Delegates_Events sample does not build with xbuild
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: XI 10.2 (iOS 10.1)
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Prashant [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-11-08 18:47 UTC by Ankit Jain
Modified: 2016-12-22 07:54 UTC (History)
4 users (show)

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


Attachments
xbuild.log (73.15 KB, text/plain)
2016-11-08 18:47 UTC, Ankit Jain
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 Ankit Jain 2016-11-08 18:47:00 UTC
Created attachment 18383 [details]
xbuild.log

Sample https://github.com/xamarin/ios-samples/blob/master/Protocols_Delegates_Events/Protocols_Delegates_Events.sln
fails to build with xbuild.

$ mono --version
Mono JIT compiler version 4.8.0 (mono-4.8.0-branch/e51aa0a Fri Oct 28 11:48:43 EDT 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
        TLS:           normal
        SIGSEGV:       altstack
        Notification:  kqueue
        Architecture:  x86
        Disabled:      none
        Misc:          softdebug
        LLVM:          yes(3.6.0svn-mono-master/8b1520c)
        GC:            sgen

Xamarin.iOS
Version: 10.4.0.6 (Xamarin Business)
Hash: 120ecb5
Branch: cycle9
Build date: 2016-11-07 15:25:09-0500

The build fails to resolve `monotouch` reference and hence errors from the compiler can be seen:

/Users/ankit/dev/ios-samples/Protocols_Delegates_Events/Xib Solution/Protocols_Delegates_Events.sln (default targets) ->
(Build target) ->
/Users/ankit/dev/ios-samples/Protocols_Delegates_Events/Xib Solution/Protocols_Delegates_Events.csproj (default targets) ->
/Library/Frameworks/Mono.framework/Versions/4.8.0/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) ->

        Main.cs(4,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Main.cs(5,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(4,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(5,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(2,14): error CS0234: The type or namespace name `Drawing' does not exist in the namespace `System'. Are you missing `System.Drawing' assembly reference?
        Protocols_Delegates_EventsViewController.cs(3,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(4,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(5,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(6,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.designer.cs(7,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(2,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(3,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(13,37): error CS0246: The type or namespace name `UIApplicationDelegate' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(10,69): error CS0246: The type or namespace name `UIViewController' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(62,35): error CS0246: The type or namespace name `MKMapViewDelegate' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(11,40): error CS0246: The type or namespace name `MKAnnotation' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(16,9): error CS0246: The type or namespace name `UIWindow' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(26,49): error CS0246: The type or namespace name `UIApplication' could not be found. Are you missing an assembly reference?
        AppDelegate.cs(26,68): error CS0246: The type or namespace name `NSDictionary' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(14,74): error CS0246: The type or namespace name `NSBundle' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(18,30): error CS0115: `Protocols_Delegates_Events.Protocols_Delegates_EventsViewController.DidReceiveMemoryWarning()' is marked as an override but no suitable method found to override
        Protocols_Delegates_EventsViewController.cs(23,30): error CS0115: `Protocols_Delegates_Events.Protocols_Delegates_EventsViewController.ViewDidLoad()' is marked as an override but no suitable method found to override
        Protocols_Delegates_EventsViewController.cs(82,46): error CS0246: The type or namespace name `MKMapView' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(82,65): error CS0246: The type or namespace name `MKAnnotationView' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.designer.cs(15,3): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(64,59): error CS0246: The type or namespace name `MKMapView' could not be found. Are you missing an assembly reference?
        Protocols_Delegates_EventsViewController.cs(64,78): error CS0246: The type or namespace name `MKAnnotationView' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(15,37): error CS0246: The type or namespace name `CLLocationCoordinate2D' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(21,25): error CS0246: The type or namespace name `CLLocationCoordinate2D' could not be found. Are you missing an assembly reference?
        SampleMapAnnotation.cs(23,32): error CS0115: `Protocols_Delegates_Events.SampleMapAnnotation.Title' is marked as an override but no suitable property found to override

         1 Warning(s)
         30 Error(s)
Comment 1 Sebastien Pouliot 2016-11-08 19:37:18 UTC
> The type or namespace name `MonoTouch' 

That makes it sounds like it's a classic (not unified) sample ? do we still have some ?
Comment 2 Ankit Jain 2016-11-08 20:27:42 UTC
Same for this project - https://github.com/xamarin/ios-samples/blob/master/Protocols_Delegates_Events/Xib%20Solution/Protocols_Delegates_Events.sln

This is the other solution in the same sample.
Comment 3 Prashant [MSFT] 2016-12-22 07:54:18 UTC
Migrated the project to Unified API, PR https://github.com/xamarin/ios-samples/pull/135

Patch:
https://patch-diff.githubusercontent.com/raw/xamarin/ios-samples/pull/135.patch