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 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.
Creating a new solution, and a new 'portable c# library' product and attempting to build on OSX results in:
/Users/douglasl/projects/FUntime/FUntime/FUntime.csproj: Error: /Users/douglasl/projects/FUntime/FUntime/FUntime.csproj: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets: Project file could not be imported, it was being imported by /Users/douglasl/projects/FUntime/FUntime/FUntime.csproj: /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets could not import "$(MSBuildToolsPath)\Novell\Novell.MonoDroid.CSharp.targets" (FUntime)
A basic sanity check indicates that yes, this file does exist:
Fri 19 Oct 2012 10:52:51 WST
[~] ls -l /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
-rw-r--r-- 1 root admin 1570 8 May 08:42 /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
Possibly this version of the file is broken somehow?
This was installed as part of the http://xamarin.com/trial download bundle:
[~] ls -l ~/Downloads/*mono*
-rw-r--r--@ 1 douglasl users 8463572 8 Oct 14:38 /Users/douglasl/Downloads/monoforandroid-eval.dmg
This behaviour has been confirmed on mountain lion on a mac mini and a mac book pro, and a snow leopard imac.
Since making portable libraries the core of making cross platform C# applications and this basic functionality is completely broken, I'm surprised there isn't already a bug report for this, but if I've missed it somehow, my apologies.
Could you go to MonoDevelop -> About MonoDevelop and paste the text from the "Version Information" tab?
Are you building inside MonoDevelop? or using md-tool on the command-line?
From inside monodevelop. I'm not doing anything obscure here; literally creating a solution, creating a project and then running build from the build -> build all menu.
Installation UUID: 6279c1a6-a30c-4e3c-8eff-4558467117f8
Mono 2.10.9 (tarball)
Package version: 210090011
Apple Developer Tools:
Xcode 4.5.1 (1842)
Mono for Android: 4.2.6 (Evaluation)
Android SDK: /Users/doug/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)
Java SDK: /usr
Release ID: 30004007
Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
Build date: 2012-09-17 14:09:17+0000
Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Mac OS X 10.8.2
Darwin dougs-Mac-mini.local 12.2.0 Darwin Kernel Version 12.2.0
Sat Aug 25 00:48:52 PDT 2012
thanks. I probably need to uninstall monotouch to reproduce this... I'll give that a try on monday
That's interesting. Yes, after installing mono touch building these libraries works fine on all the systems I was having trouble with before.
It seems this issue is limited to the standard alone mono for android installation.
I'm having a possibly related problem - http://forums.xamarin.com/discussion/164/pcl-build-problems
My problem might be caused because I've previously adjusted the Microsoft.Portable.CSharp.targets file to make it work with monotouch - see:
Not quite sure what to do at present - but I've got lots of projects not currently building (should I log this as a new issue or attach it here?)
I can reproduce this now that I have uninstalled MonoTouch
Created attachment 2770 [details]
Okay, the problem was that the following line in your Microsoft.Portable.CSharp.targets file:
<Import Project="$(MSBuildToolsPath)\Novell\Novell.MonoDroid.CSharp.targets" Condition = "Exists ('/Developer/MonoAndroid/License.rtf') And !Exists ('/Developer/MonoTouch/License.rtf')"/>
needs to be changed to:
<Import Project="$(MSBuildExtensionsPath)\Novell\Novell.MonoDroid.CSharp.targets" Condition = "Exists ('/Developer/MonoAndroid/License.rtf') And !Exists ('/Developer/MonoTouch/License.rtf')"/>
(e.g. replace MSBuildToolsPath with MSBuildExtensionsPath)
You can find this file at /Library/Frameworks/Mono.framework/Versions/2.10.9/lib/mono/xbuild/Microsoft/Portable/v4.0/Microsoft.Portable.CSharp.targets
I've attached the latest version of this file from git master
I've committed a fix for this to the mono-2-10 branch and also to git master (which is where the 3.0 builds will be coming from)
I'll poke our release engineering team to make sure my patch gets into the final 2.10.10 release