Bug 46615 - CFNetwork sample from `mac-samples` fails to build with xbuild
Summary: CFNetwork sample from `mac-samples` fails to build with xbuild
Status: RESOLVED ANSWERED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Samples ()
Version: Master
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-08 21:17 UTC by Ankit Jain
Modified: 2016-11-09 19:22 UTC (History)
4 users (show)

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


Attachments
xbuild.log (169.82 KB, text/plain)
2016-11-08 21:17 UTC, Ankit Jain
Details
xbuild-1.log (302.67 KB, text/plain)
2016-11-09 18:00 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 ANSWERED

Description Ankit Jain 2016-11-08 21:17:40 UTC
Created attachment 18389 [details]
xbuild.log

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


---
/Users/ankit/dev/mac-samples/CFNetwork/CFNetwork.sln (default targets) ->
(Build target) ->

        /Users/ankit/dev/mac-samples/CFNetwork/MonoMac.CFNetwork.Test.csproj: error : /Users/ankit/dev/mac-samples/CFNetwork/MonoMac.CFNetwork.Test.csproj: /Users/ankit/dev/mac-samples/CFNetwork/MonoMac.CFNetwork.Test.csproj could not import "$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets"


---

The csproj has this:

  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />

(https://github.com/xamarin/mac-samples/blob/master/CFNetwork/MonoMac.CFNetwork.Test.csproj#L171)
Comment 1 Ankit Jain 2016-11-08 21:18:08 UTC
$ 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
Comment 2 Chris Hamons 2016-11-09 17:52:14 UTC
It looks like mono removed some stuff.

Can you try again, this time manually removing this line:

  <Import Project="$(MSBuildExtensionsPath)\Mono\MonoMac\v0.0\Mono.MonoMac.targets" />

from MonoMac.CFNetwork.Test.csproj and report back?
Comment 3 Ankit Jain 2016-11-09 18:00:16 UTC
Now it fails to resolve `XamMac` and has Apple's API related errors. attaching a log file. xbuild-1.log
Comment 4 Ankit Jain 2016-11-09 18:00:44 UTC
Created attachment 18395 [details]
xbuild-1.log
Comment 5 Chris Hamons 2016-11-09 19:22:58 UTC
XamMac = Classic. Classic projects never build w\ xbuild.