Bug 57078 (vs-530171) - Previewer opens Android preview when iOS project is set as startup
Summary: Previewer opens Android preview when iOS project is set as startup
Status: REOPENED
Alias: vs-530171
Product: Xamarin Studio
Classification: Desktop
Component: Xamarin.Forms Previewer (show other bugs)
Version: Trunk
Hardware: PC Mac OS
: Highest major
Target Milestone: 15.7
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-01 20:52 UTC by Pierce Boggan [MSFT]
Modified: 2018-01-12 11:34 UTC (History)
7 users (show)

Tags: vsfmbb08,vs-sync
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 for Bug 57078 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
REOPENED

Description Pierce Boggan [MSFT] 2017-06-01 20:52:19 UTC
# Steps to Reproduce
1. File -> New -> Forms app.
2. Open one of the XAML pages.
3. Enable the previewer (if not already enabled).

# Expected Behavior
Previewer opens current startup project's preview. For example, the default on a File -> New is iOS. When I open the previewer, it should default the first view it attempts to preview to the default (which in this case, should be iOS).

# Actual Behavior
Previewer always opens to Android by default, as seen below:
https://www.screencast.com/t/x9lvaUDx

# Additional Info
Environmental Info:
https://gist.github.com/pierceboggan/7e047feac3f9baae0b1d39c00e816753
Comment 1 John Miller [MSFT] 2017-08-16 19:49:41 UTC
@Pierce,

I couldn't reproduce this with 7.2. Instead, it always shows the iOS tab selected in the previewer regardless of what my startup project is. Can you provide some more details and confirm if you see this with 7.2? 

Note* I can't view the screencast because of flash.
Comment 2 Alan McGovern 2017-08-28 13:00:43 UTC
The current logic is:

* If you have an iOS only project then iOS will be the default option.
* If you have an Android only project then Android will be the default option.
* If you have iOS and Android then *by default the very first time you open a xaml file* it will use Android.
* In all other scenarios it will use whichever view the user used previously. i.e. if you never change it then it will always show android (as expected). If you manually decide to view as iOS then future xaml files will open under iOS by default, the assumption being that you choose iOS for a reason and we should respect that decision.

Using the startup project in the manner you suggest would mean forcing the user to constantly change to another view.
Comment 3 Joseph Hill 2017-08-28 15:24:01 UTC
The heart of this request was to get this behavior changed:

> If you have iOS and Android then *by default the very first time you open a xaml file* it will use Android.

Because the very first time you open a XAML file, you are evaluating Xamarin and Xamarin.Forms, and we want to make sure you have as pleasant of an experience as possible.  On Mac, the Android experience is significantly worse than the iOS experience.
Comment 4 Alan McGovern 2017-08-28 15:28:42 UTC
> On Mac, the Android experience is significantly worse than the iOS experience.

What is worse about the android experience than the iOS experience? Is there something we can address there?

The context for this decision is: We always use android because it used to be an order of magnitude faster to initialise Android than it was iOS. If you're working in Visual Studio it also means we do not force people to have a paired Mac.