Bug 5095 - Target errors while building default templates using MD3.0 with Mono 2.10.9 on OS X 10.7.4
Summary: Target errors while building default templates using MD3.0 with Mono 2.10.9 o...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: General ()
Version: 3.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-05-15 14:48 UTC by Tamas Nagy
Modified: 2012-05-15 21:05 UTC (History)
3 users (show)

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

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 Tamas Nagy 2012-05-15 14:48:20 UTC
I reinstalled OS X on my laptop two days ago and reinstalled Mono, MonoDevelop, and MonoTouch using the latest stable revisions. I am now having trouble even building the default templates included in MonoDevelop. For example, if I create a new solution and project, say an empty iPad single-page application I receive the following error:

Build FAILED.

Warnings:

/Users/tamasnagy/Developer/iTEST/test2/test2.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets (ResolveAssemblyReferences target) ->

	/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.Common.targets:  warning : Reference 'monotouch' not resolved

Errors:

/Users/tamasnagy/Developer/iTEST/test2/test2.csproj (Build) ->
/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/4.0/Microsoft.CSharp.targets (CoreCompile target) ->

	AppDelegate.cs(5,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing a using directive or an assembly reference?
	AppDelegate.cs(6,7): error CS0246: The type or namespace name `MonoTouch' could not be found. Are you missing a using directive or an assembly reference?
	AppDelegate.cs(17,17): error CS0246: The type or namespace name `UIWindow' could not be found. Are you missing a using directive or an assembly reference?
	AppDelegate.cs(26,57): error CS0246: The type or namespace name `UIApplication' could not be found. Are you missing a using directive or an assembly reference?
	AppDelegate.cs(26,76): error CS0246: The type or namespace name `NSDictionary' could not be found. Are you missing a using directive or an assembly reference?

	 1 Warning(s)
	 5 Error(s)

Similar errors related to *.targets occurs with all the tested templates including an empty ASP.NET project: 

/Users/tamasnagy/Developer/iTEST/test4/test4.vbproj: Error: /Users/tamasnagy/Developer/iTEST/test4/test4.vbproj: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets: Project file could not be imported, it was being imported by /Users/tamasnagy/Developer/iTEST/test4/test4.vbproj: Imported project: "/Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/VisualStudio/v10.0/WebApplications/Microsoft.WebApplication.targets" does not exist. (test4)

Here is the version information of my system:


MonoDevelop 3.0 (3.0.1)
Installation UUID: e9514b74-9aa9-479d-8c09-1a36ae22b9fa
Runtime:
	Mono 2.10.9 (tarball Tue Apr 17 18:59:12 EDT 2012)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090010
Mono for Android: 4.2.1.196198126 (Evaluation)
Android SDK: /Users/tamasnagy/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
	Version: 1.6	ApiLevel: 4
	Version: 2.1	ApiLevel: 7
	Version: 2.2	ApiLevel: 8
	Version: 2.3	ApiLevel: 10
	Version: 3.1	ApiLevel: 12
	Version: 4.0	ApiLevel: 14
	Version: 4.0.3	ApiLevel: 15
Java SDK: /usr/bin

Apple Developer Tools:
	 Xcode 4.3.2 (1177)
	 Build 4E2002
Monotouch: 5.2.11 (Evaluation)
Build information:
	Release ID: 30001000
	Git revision: 6642975fcf75fabbaf71a2ce79cdd65cd7db812a-dirty
	Build date: 2012-05-14 11:09:56+0000
	Xamarin addins: a1563f182f5d7a68e0ba06beda0a39f9fe073016
Operating System:
	Mac OS X 10.7.4
	Darwin Tamass-MacBook-Air.local 11.4.0 Darwin Kernel Version 11.4.0
	    Mon Apr  9 19:32:15 PDT 2012
	    root:xnu-1699.26.8~1/RELEASE_X86_64 x86_64
Comment 1 Mikayla Hutchinson [MSFT] 2012-05-15 15:13:21 UTC
Xbuild is not currently supported for MonoTouch or ASP.NET projects. Please disable the experimental xbuild integration in MonoDevelop preferences.
Comment 2 Tamas Nagy 2012-05-15 18:03:22 UTC
Thank you that solves my problems with MonoTouch. However, I'm still having similar issues with MonoDroid (running default template):

/Users/tamasnagy/Developer/Futhark/Futhark.Client.Android/Futhark.Client.Android.csproj (Build) ->

	/Users/tamasnagy/Developer/Futhark/Futhark.Client.Android/Futhark.Client.Android.csproj: error : /Users/tamasnagy/Developer/Futhark/Futhark.Client.Android/Futhark.Client.Android.csproj could not import "$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets"

	 0 Warning(s)
	 1 Error(s)
Comment 3 Mikayla Hutchinson [MSFT] 2012-05-15 18:13:50 UTC
Does the following file exist?

/Library/Frameworks/Mono.framework/External/xbuild/Novell/Novell.MonoDroid.CSharp.targets
Comment 4 Tamas Nagy 2012-05-15 18:16:04 UTC
I do not have a Frameworks directory. Should I attempt to reinstall MonoDroid?
Comment 5 Mikayla Hutchinson [MSFT] 2012-05-15 20:23:10 UTC
That's impossible, you can't run MonoDevelop at all without Mono installed.

It's /Library (in the root of the drive), not ~/Library (in your home folder).
Comment 6 Tamas Nagy 2012-05-15 20:31:43 UTC
You are correct I was in the wrong directory. 

Commands	Home		Mono		Versions
Headers		Libraries	Resources

I do not see an external directory
Comment 7 Jonathan Pryor 2012-05-15 21:05:43 UTC
If the External directory doesn't exist, do the following:

    cd /Library/Frameworks/Mono.framework
    sudo mkdir External
    sudo chown root:admin External
    sudo chmod 755 External
    cd External
    sudo unzip /Developer/MonoAndroid/usr/share/External.zip

Once that is done, you should be able to do:

    cd /Users/tamasnagy/Developer/Futhark/Futhark.Client.Android
    xbuild Futhark.Client.Android.csproj