Bug 51680 - Previewer shows no indication of changes or refreshing in progress
Summary: Previewer shows no indication of changes or refreshing in progress
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms Previewer ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-01-21 00:01 UTC by David Ortinau [MSFT]
Modified: 2017-07-13 16:39 UTC (History)
7 users (show)

Tags: ac vs
Is this bug a regression?: ---
Last known good build:

environment notes (2.57 KB, text/plain)
2017-01-21 00:01 UTC, David Ortinau [MSFT]
project (6.51 MB, application/x-zip-compressed)
2017-01-21 00:24 UTC, David Ortinau [MSFT]
logs (13.70 KB, application/x-zip-compressed)
2017-01-30 20:23 UTC, David Ortinau [MSFT]

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 51680 on Developer Community 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
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description David Ortinau [MSFT] 2017-01-21 00:01:26 UTC
Created attachment 19424 [details]
environment notes

Maybe I'm just not seeing it, so apologies if this is ignorance of Visual Studio.

I have 2 xaml files open and the previewer. When I switch between them I see no indication that the preview knows I've changed or that it's in the process of re-rendering. 

I don't know if it's waiting for me to save? Should I click on the xaml file editor window and then the previewer window?

I would expect when I focus on a xaml file, the previewer indicates it's in the process of refreshing to acknowledge my focus change to a new xaml file.

In my situation one xaml file was good and renders fine, but the other has an error and will show the error. The error however doesn't appear as soon as I focus on the bad xaml file. It takes several seconds, enough for me to wonder what's going on.
Comment 1 David Ortinau [MSFT] 2017-01-21 00:24:39 UTC
Created attachment 19430 [details]
Comment 2 Alan McGovern 2017-01-21 00:33:00 UTC
We need the logs from this session to diagnose the issue. The project itself doesn't really help for this type of problem
Comment 3 David Ortinau [MSFT] 2017-01-30 20:23:43 UTC
Created attachment 19649 [details]

I'm not sure this is going to show you anything unless you're maybe getting a silent error that some progress indicator failed to display.

I opened 3 xaml pages, and when moving between them, the previewer doesn't show any progress indicator like I saw when the view initially rendered. As a result, I don't know what's going on. Some more complex views take 20 seconds or more to render and leads me to thing the previewer is broken.
Comment 4 David Ortinau [MSFT] 2017-01-30 20:24:41 UTC
Status to NEW with logs added.
Comment 5 Alan McGovern 2017-02-01 11:20:20 UTC
Xamarin.VisualStudio.ActivationManager|Error|0|The renderer encountered an error while rendering this file: Xamarin.Forms.Xaml.XamlParseException: Position 7:6. Type BonusControl not found in xmlns http://xamarin.com/schemas/2014/forms
at Xamarin.Forms.Xaml.CreateValuesVisitor.Visit (Xamarin.Forms.Xaml.ElementNode node, Xamarin.Forms.Xaml.INode parentNode) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\CreateValuesVisitor.cs:130
at Xamarin.Forms.Xaml.ElementNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlNode.cs:176
at Xamarin.Forms.Xaml.RootNode.Accept (Xamarin.Forms.Xaml.IXamlNodeVisitor visitor, Xamarin.Forms.Xaml.INode parentNode) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlNode.cs:226
at Xamarin.Forms.Xaml.XamlLoader.Visit (Xamarin.Forms.Xaml.RootNode rootnode, Xamarin.Forms.Xaml.HydratationContext visitorContext) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:122
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.String xaml) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:76
at Xamarin.Forms.Xaml.XamlLoader.Load (System.Object view, System.Type callingType) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\XamlLoader.cs:56
at Xamarin.Forms.Xaml.Extensions.LoadFromXaml[TXaml] (TXaml view, System.Type callingType) in C:\BuildAgent2\work\ca3766cfc22354a1\Xamarin.Forms.Xaml\ViewExtensions.cs:36
at RegistrationForm.Pages.Page2.InitializeComponent () in C:\work\xamarin-blog-samples\xamarin.forms\RegistrationForm\Droid\obj\Debug\RegistrationForm.Droid.Pages.Page2.xaml.g.cs:21
at RegistrationForm.Pages.Page2..ctor () in C:\work\xamarin-blog-samples\xamarin.forms\RegistrationForm\RegistrationForm\Pages\Page2.xaml.cs:15
at <unknown method> at offset 12 in file:line:column <filename unknown>:0:0
at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:661
Comment 6 Alan McGovern 2017-02-01 11:23:31 UTC
or perhaps

Xamarin.VisualStudio.ActivationManager|Error|0|The renderer encountered an error while rendering this file: System.Xml.XmlException: Name cannot begin with the '
' character, hexadecimal value 0x0D. Line 7, position 6.
at System.Xml.XmlTextReaderImpl.Throw (System.Exception e) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:2503
at System.Xml.XmlTextReaderImpl.Throw (System.String res, System.String[] args) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:2486
at System.Xml.XmlTextReaderImpl.Throw (System.Int32 pos, System.String res, System.String[] args) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:2461
at System.Xml.XmlTextReaderImpl.ParseQName (System.Boolean isQName, System.Int32 startOffset, System.Int32& colonPos) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:6797
at System.Xml.XmlTextReaderImpl.ParseQName (System.Int32& colonPos) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:6765
at System.Xml.XmlTextReaderImpl.ParseElement () in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:3977
at System.Xml.XmlTextReaderImpl.ParseElementContent () in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:3830
at System.Xml.XmlTextReaderImpl.Read () in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Core/XmlTextReaderImpl.cs:1166
at System.Xml.XmlLoader.LoadNode (System.Boolean skipOverWhitespace) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlLoader.cs:211
at System.Xml.XmlLoader.LoadDocSequence (System.Xml.XmlDocument parentDoc) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlLoader.cs:56
at System.Xml.XmlLoader.Load (System.Xml.XmlDocument doc, System.Xml.XmlReader reader, System.Boolean preserveWhitespace) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlLoader.cs:48
at System.Xml.XmlDocument.Load (System.Xml.XmlReader reader) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlDocument.cs:1108
at System.Xml.XmlDocument.Load (System.IO.TextReader txtReader) in /Users/builder/data/lanes/4009/e9df39b2/source/mono/mcs/class/referencesource/System.Xml/System/Xml/Dom/XmlDocument.cs:1090
at Xamarin.Forms.Previewer.XamarinFormsLoader.GetXamlFormType (System.String xaml, System.String assemblyName) in :0
at Xamarin.Forms.Previewer.XamarinFormsLoader.LoadFromXaml (MonoTouch.Design.XamlRenderContext context) in :0
at AndroidFormsRendering.XFPageRendererView.Initialize (System.Int32 contentId) in :0

Note to self: double check this is propagated back properly.
Comment 7 Kent Green [MSFT] 2017-07-13 16:39:25 UTC
I've tested this in Visual Studio for Mac for comparison and am unable to reproduce the issue there, it seems to correctly refresh the preview when I change files as long as the app was built beforehand. 

Also, I noticed that this bug was originally filed for the "iOS Designer", however based on the sample & description referring to the previewer & XAML I believe this issue is actually with the "Forms Previewer" rather than the "iOS Designer" (i.e. storyboard designer). So I am updating that accordingly.

## Build Information
=== Visual Studio Community 2017 for Mac (Preview) ===

Version 7.1 Preview (7.1 build 583)
Installation UUID: 42f9117b-22e2-4aaa-8fa1-535faf6d64a4
	Mono (2017-04/4a0006f) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000104

=== NuGet ===


=== .NET Core ===

Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Apple Developer Tools ===

Xcode 8.3.3 (12175.1)
Build 8E3004b

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 7571635e
Branch: master
Build date: 2017-05-09 16:04:54-0400

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/kentgreen/Library/Android/sdk
	Supported Android versions:
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.0

Java SDK: /usr
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Android Designer EPL code available here:

=== Xamarin Inspector ===

Version: 1.3.0-alpha2
Hash: fa030e0
Branch: master
Build date: Thu, 01 Jun 2017 20:55:26 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Build Information ===

Release ID: 701000583
Git revision: 445a7f09feca58babb966e0c66a6b299d0bd450c
Build date: 2017-05-12 16:05:38-04
Xamarin addins: f9b72ca5f6ca5d9476d8f58353ada2afd56c549b
Build lane: monodevelop-lion-d15-3-preview

=== Operating System ===

Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
    Fri Apr 14 16:21:16 PDT 2017
    root:xnu-3789.60.24~6/RELEASE_X86_64 x86_64