Bug 2372 - ObjectiveC Bindings project fails to build due to missing .targets file
Summary: ObjectiveC Bindings project fails to build due to missing .targets file
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 5.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Alex Corrado [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2011-12-06 15:12 UTC by Adam Kemp
Modified: 2011-12-15 14:42 UTC (History)
1 user (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 Adam Kemp 2011-12-06 15:12:01 UTC
I created a new ObjectiveC Bindings project, and it fails to build with the following error:

/Users/akemp/Projects/nextgen/R2/Tablets/Dev/Tablets/VariableManager/VariableManagerNativeBindings.csproj: Error: /Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets: Project file could not be imported, it was being imported by /Users/akemp/Projects/nextgen/R2/Tablets/Dev/Tablets/VariableManager/VariableManagerNativeBindings.csproj: Imported project: "/Library/Frameworks/Mono.framework/Versions/2.10.6/lib/mono/xbuild/Xamarin/Xamarin.ObjcBinding.CSharp.targets" does not exist. (VariableManagerNativeBindings)

I can't find the Xamarin.ObjcBinding.CSharp.targets file anywhere. I don't know if something didn't get installed right or what. I recently updated to the latest version. I didn't see this project template before, so either it's new (and broken) or I just didn't notice it before. Either way I can't use this right now. Is this feature just not ready yet, or is there a workaround?
Comment 1 Jeffrey Stedfast 2011-12-06 15:54:43 UTC
It is a new project type. Unfortunately, it needs the latest MonoDevelop (which presumably you have) and a new MonoTouch (the targets files are part of MonoTouch, not sure if they made it into 5.0.3 or not - if not, then they should be in 5.0.4).

Which version of MonoTouch do you have? And I can try and track down for sure if your version should have them.
Comment 2 Jeffrey Stedfast 2011-12-06 15:57:27 UTC
Looks like they should be in MonoTouch 5.0.3
Comment 3 Adam Kemp 2011-12-06 16:53:48 UTC
I have MonoDevelop 2.8.4.2 and MonoTouch 5.0.3. The check for updates feature in MonoDevelop claims I have the latest version of MonoDevelop, MonoTouch, MonoDroid, and all other addons. Maybe the update did not install properly.
Comment 4 Jeffrey Stedfast 2011-12-06 17:13:55 UTC
More likely it was never included in the .dmg

Corrado: any ideas how to make the build scripts include the .targets files from /Library/Frameworks/Mono.framework/External/... ?
Comment 5 Jeffrey Stedfast 2011-12-07 19:01:19 UTC
Confirmed that the files are not in the .dmg, working on a fix now...
Comment 6 Jeffrey Stedfast 2011-12-08 11:42:29 UTC
Fixed in the next MonoTouch release (I think that'll be 5.0.4)
Comment 7 Adam Kemp 2011-12-15 11:42:19 UTC
I just installed 5.0.4, and this is not fixed in that version. I still can't build a bindings project for the same reason as before.
Comment 8 Jeffrey Stedfast 2011-12-15 12:15:50 UTC
Not sure what went wrong in the install script, but the files are included in monotouch-5.0.4.dmg and get installed to /Developer/MonoTouch/MSBuild/*.targets and *.dll

Copy those files to /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/
Comment 9 Jeffrey Stedfast 2011-12-15 12:17:14 UTC
Ah, I made a dumb mistake last minute before they rolled 5.0.4 with quoting the arguments passed to cp in the install script and so the wildcard (*) wasn't expanded. D'oh.

Easy fix.
Comment 10 Adam Kemp 2011-12-15 12:26:30 UTC
If the installer doesn't work then the feature doesn't work. If you need to change the product to "installer" or something then feel free, but it doesn't make sense to consider this fixed when it's still broken. I am looking forward to using the feature, though!
Comment 11 Jeffrey Stedfast 2011-12-15 12:41:53 UTC
I closed it because I fixed the installer. Sorry if that wasn't clear. I wouldn't close it otherwise :-)
Comment 12 Adam Kemp 2011-12-15 14:09:08 UTC
My mistake. Thanks for the quick response. Is there an ETA for the next installer?
Comment 13 Jeffrey Stedfast 2011-12-15 14:42:03 UTC
No prob.

Sadly probably not until mid-January (we're on a semi 2 week schedule, but most people will be gone between now and the first week of Jan)