Bug 47514 - Xamarin.Forms Previewer in Visual Studio fails to load Xaml file
Summary: Xamarin.Forms Previewer in Visual Studio fails to load Xaml file
Status: RESOLVED DUPLICATE of bug 49066
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Xamarin.Forms Previewer ()
Version: unspecified
Hardware: PC Windows
: --- critical
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-11-19 20:21 UTC by charlie
Modified: 2016-12-14 12:10 UTC (History)
5 users (show)

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


Attachments
logs (631 bytes, application/xml)
2016-11-24 04:06 UTC, charlie
Details
iOSDesigner log (243 bytes, text/plain)
2016-11-24 04:07 UTC, charlie
Details
monodroid log (1.21 KB, text/plain)
2016-11-24 04:08 UTC, charlie
Details
ide log (131 bytes, text/plain)
2016-11-24 04:08 UTC, charlie
Details


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 DUPLICATE of bug 49066

Description charlie 2016-11-19 20:21:05 UTC
# Steps to reproduce
Open Visual Studio 2015, create a new `Blank Xaml App (Xamarin.Forms Portable)` project, restore nuget packages, open MainPage.xaml, build solution, go to the menu `View -> Other Windows -> Xamarin.Forms Previewer`.

# Expected behavior
The Previewer window should load the MainPage.xaml file or show a message indicating why it is not loading anything.

# Actual behavior
The Previewer window doesn't load the MainPage.xaml file and no message or error shows up anywhere. It just sits there doing nothing.

# Supplemental info (logs, images, videos)

# Test environment (full version information)
Visual Studio 2015 Community Edition Version `14.0.25431.01 Update 3` with Xamarin `1.0.0` (updated this morning) running in Windows 7. Tried with the Xamarin.Forms `2.2.0.45` nuget package (default package version that came with the blank project) and then with the `2.3.3.166-pre4` pre-release update, both show the same behavior. Android SDK build tools 23.0.2 and Android NDK r13b.
Comment 1 Alan McGovern 2016-11-23 10:13:19 UTC
Can you attach the log files from a session where the previewer failed to load your xaml file? Also, can you confirm that it failed under both 'iOS' and 'Android' mode?
Comment 2 charlie 2016-11-24 04:06:01 UTC
Created attachment 18638 [details]
logs
Comment 3 charlie 2016-11-24 04:07:50 UTC
Created attachment 18639 [details]
iOSDesigner log
Comment 4 charlie 2016-11-24 04:08:16 UTC
Created attachment 18640 [details]
monodroid log
Comment 5 charlie 2016-11-24 04:08:38 UTC
Created attachment 18641 [details]
ide log
Comment 6 charlie 2016-11-24 04:15:09 UTC
I added the Xamarin logs. Sorry couldn't find a way to upload them all at once.

I tried switching both Platform (Android, iOS) and Device (Phone, Tablet) in the Forms Previewer. The label and device size changed respectively but it didn't load the xaml file.

I can upload the project if it helps, but as I said it is just the default `Blank Xaml App (Xamarin.Forms Portable)`.
Comment 7 Alan McGovern 2016-11-24 13:17:08 UTC
Yeah, in these logs there is no sign of anything related to the previewer actually loading. The question now is why did nothing load/run?

Which xaml file were you editing? If it was the App.xaml, the one whose root element is `<Application />`, then these are not renderable and that could explain why you're getting this behaviour.

If it is a normal ContentPage, or similar, then this is pretty odd alright. If it was a ContentPage, or similar, does the previewer start to work if you start making modifications to the file? There is a known issue in the VS integration where the previewer does not auto-load immediately if it is opened *after* the xaml file has been opened.
Comment 8 charlie 2016-11-24 19:23:15 UTC
Yes it was not the App.xaml but the MainPage.xaml. A regular ContentPage with a single Label in it. I tried making modifications, switching the Label for a StackLayout with several Labels.

I'll try opening the Previewer before opening the xaml file once I get home and report back.
Comment 9 Alan McGovern 2016-12-14 12:10:04 UTC
This is likely to be a duplicate of bug #49066. In this case we not reporting some error cases correctly. This particular issue might be fixed by compiling the project, or it could've been one of the other cases which will be correctly reported now.

*** This bug has been marked as a duplicate of bug 49066 ***