Bug 27309 - The attribute "DependsOnTarget" in element <Target> is unrecognized
Summary: The attribute "DependsOnTarget" in element <Target> is unrecognized
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.9
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-02-23 11:28 UTC by xamarin
Modified: 2016-12-28 17:44 UTC (History)
12 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 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 xamarin 2015-02-23 11:28:01 UTC
Loading a bindings project in Visual Studio doesn't work with the following error:

1>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.ObjcBinding.CSharp.targets(92,43): error MSB4066: The attribute "DependsOnTarget" in element <Target> is unrecognized.

Quick search online reveals that the attribute name should be DependsOnTargets -- changing the Xamarin.ObjcBinding.CSharp.targets file accordingly seems to fix the problem and the project loads -- however building still fails (see the other bug I opened).
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-04-09 11:16:31 UTC
Support for iOS bindings projects in Visual Studio is a new feature starting in XamarinVS 3.11 (currently on the Alpha channel).

This bug was originally filed against XamarinVS 4.0 (C6), but that version has not been released yet, so I suspect the actual version might have been one of the XamarinVS 3.9 versions.


Please:


- Add your complete version information from "Help -> About Microsoft Visual Studio -> Copy Info" on this bug. (See also [1].)

> [1] https://kb.xamarin.com/customer/portal/articles/1910343-when-and-how-should-i-file-a-bug-report-

(If this link redirects to the top-level `https://kb.xamarin.com` page the first time you click it, try clicking it once more.)



- If you're already using XamarinVS 3.11, please attach the Diagnostic Build Output [2] for the project onto this bug report.

> [2] https://kb.xamarin.com/customer/portal/articles/1675684#verbose-build-output-logs



Thanks in advance!
Comment 3 Michael Fink 2015-05-20 10:30:55 UTC
The same bug as described occurs for me as I upgraded from an earlier version  of Xamarin.iOS (8.4.0.0) to Xamarin.iOS 8.10.0.0, so it's definitely a regression. Changing the Xamarin.ObjcBinding.CSharp.targets file as described also fixes the bug for me.

Here's the "Copy Info" from Visual Studio 2013:

Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.51209

Installed Version: Professional

[...]

Xamarin   3.11.446.0 (db2a71b)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   5.1.1.0 (3518c4ceb984ffea1f5d972ea9c09eb27738d565)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.Forms Intellisense   1.0
Provides intellisense for Xamarin.Forms in the XML editor.

Xamarin.iOS   8.10.0.0 (7741cc495ab0baf04ff0405d0604bc27f0ecae2e)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified

Xamarin.TestCloud.Integration   1.0
Early preview of Xamarin Test Cloud integration
Comment 4 Rogier van der Hee 2015-08-14 04:12:37 UTC
This problem is still occurring with me on a fresh install (clean new Windows 10 install, full Xamarin reinstall, VS2015) that I did only yesterday on my laptop with VS 3.11.836 and iOS 8.10.40.

Doing the fix as Michael described fixes the problem. 

So the issue is still there!
Comment 5 Parmendra Kumar 2015-10-06 12:20:44 UTC
I am also getting same issue.

Screencast: http://www.screencast.com/t/D67Umq7neS

Environment info:

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.6.00081

Installed Version: Professional

Xamarin   4.0.0.1568 (e8fb98c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.0.11 (f94dc5b)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.2.0.84 (b5396c2)
Visual Studio extension to enable development for Xamarin.iOS.

Xamarin.iOS Unified Migration   1.0
Automated migration for Xamarin iOS Classic projects to Unified
Comment 6 Emanuel 2016-12-23 15:08:50 UTC
Hi,
As we've added several improvements to our build system and Binding projects since the bug was reported, I'm resolving it tentatively as Fixed.
That said, if you're still facing this issue with current bits, please feel
free to reopen the bug.
Thanks
Comment 7 Michael Fink 2016-12-28 17:44:40 UTC
I freshly installed the latest version of Xamarin.iOS (10.2.0.4) from Xamarin setup (4.2.0.719) and can confirm that the bindings project can now successfully be opened.