Bug 59065 - Xamarin.Forms item templates are all duplicated.
Summary: Xamarin.Forms item templates are all duplicated.
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Templates (show other bugs)
Version: 4.6.0 (15.3)
Hardware: PC Windows
: --- normal
Target Milestone: 15.5
Assignee: Joaquin Jares
URL:
Depends on:
Blocks:
 
Reported: 2017-08-26 21:44 UTC by Pierce Boggan [MSFT]
Modified: 2017-10-13 02:54 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: Yes
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 Pierce Boggan [MSFT] 2017-08-26 21:44:38 UTC
# Steps to Reproduce

1. Open any Xamarin.Forms app.
2. Right-click project to add an item template -> Add -> Add File -> Xamarin.Forms.

# Expected 

All item templates only appear once.

# Actual

All item templates are duplicated 2x:
https://www.screencast.com/t/ExKvLsAp

# Version Information
https://gist.github.com/pierceboggan/b23cdc393fb5c2fc9361321bfd90cac3
Comment 1 Pierce Boggan [MSFT] 2017-10-13 02:51:59 UTC
Developers will only see this issue when working with Xamarin.iOS and Xamarin.Android-flavored projects, not Shared Projects, .NET Standard, or PCL. In other words, this only affects Xamarin.Forms Embedding scenarios.

Technical reason:
This was due to an issue where the <AppliesTo> was returning `True` for BOTH the SAP and PCL versions (because all it was really doing was making sure it wasn't the _other_ project flavor, and showing the item templates if so).