Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 20783 [details]
Repro (on my machine)
1. Start Visual Studio 2017 Professional (with no updates pending, that is VS 15.0.0+26228.9 and Xamarin 220.127.116.114 (73f58d6) at the moment).
2. Create a new solution from the "C#/Cross-Platform/Cross Platform App (Xamarin.Forms or Native)" template, using .NET 4.5.2.
3. Delete the iOS project.
4. Open MainPage.xaml in the Forms project.
5. View/Other Windows/Forms previewer.
A preview of the XAML page appears. If the preview cannot be shown, an error message appears giving me further details about the problem.
See attached screenshot: "System.Exception was thrown. Failed to render Android XAML preview". Neither the exception message nor the stack trace is shown.
This bug report is not about the previewer not working on my machine. It's about the previewer not showing useful debugging information in case of an error, thus preventing me from filing a useful bug report about the underlying issue.
What you're seeing there is the fallback error when the only thing that we can detect has gone wrong is that the image was not generated. This case *should* not ever be hit, which is why there's no useful information.
Would you be able to attach the logs from the session where you triggered this error message? Perhaps we'll see something useful there which will help us provide a more informative message in the future!
Created attachment 20785 [details]
Ah, that makes sense then. Thanks for looking into this. I've attached everything from %LOCALAPPDATA%\Xamarin\Logs; if you need anything else, just say so.
Unsurprisingly the logs are pretty much empty as well.
One thing I did notice is that you're using Visual Studio 2017. We did have an installation issue with it, which is already fixed and being prepped for release, which may be the root cause of the issue you're seeing. Can you try installing just the Android component of our stable installer here, https://dl.xamarin.com/XamarinforVisualStudio/Windows/Xamarin.VisualStudio_18.104.22.1689.msi . You do not need to install the Visual Studio extensions, so do uncheck those if they are checked. Let us know if that helps/doesn't help!
Yes, that fixed it, thanks a lot for your help!
(I don't know which close reason is appropriate in this case (probably DUPLICATE of the issue you mentioned?), so I'll leave that to you.)
I'll just mark it as resolved to make sure we triple-check this scenario before our next release.
Thanks for the quick confirmation!
Note to whoever verifies this bug: Can we make sure we have a clean system and then only install VS2017 to make sure the first-run is still good with our 15.1 (and newer) releases!
Microsoft Visual Studio Enterprise 2017
Version 15.0.26228.12 D15RTWSVC
Microsoft .NET Framework
Installed Version: Enterprise
Xamarin 22.214.171.1245 (aece090)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 126.96.36.199 (3a62f1e)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.6.0.9 (a05f40e)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Error message is displayed as attached in the attachment named FormsPreviewer (1)
Created attachment 21096 [details]
Contains iOS and Android designer Screenshots