15

I am using xamarin forms v2. 3.2.127 stable on Visual Studio 2015 Community Edition in Windows 10 Operating System. Every time I try to open the xaml, the Xamarin Forms Previewer did not show anything, just a blue box like the screenshot below. I have also tried to create new project even in the latest pre-release channel but it still the same.

enter image description here

8
  • Haw you built your project?, it won't show without building project first Sep 19, 2016 at 8:12
  • Hi Brian, in my case the preview is only too slow but it's working
    – Enrico
    Sep 19, 2016 at 9:19
  • @Greensy Yes I have rebuild my project many times.
    – Brian lee
    Sep 19, 2016 at 9:30
  • @Enrico Hi Enrico, Are you using the vs community edition ? can you give me your xamarin version ?
    – Brian lee
    Sep 19, 2016 at 9:33
  • Yes, I'm using community edition. Microsoft Visual Studio Enterprise 2015 Version 14.0.25431.01 Update 3 Microsoft .NET Framework Version 4.6.01038 Xamarin 4.2.0.680 (c4382f5) Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android. Xamarin.Android 7.0.0.18 (0e59c36) Visual Studio extension to enable development for Xamarin.Android. Xamarin.iOS 10.0.0.6 (6c3fee4) Visual Studio extension to enable development for Xamarin.iOS.
    – Enrico
    Sep 19, 2016 at 9:59

8 Answers 8

6

Like @jgoldberger said, the XAML previewer is still in early development. However if you are on the Xamarin Stable update channel it might be worth switching to the Beta update channel.

There have been vast improvements in the XAML previewer in the next release, which is currently on the 6th RC iteration (ie. very close to stable). This way you can at least see if the previewer improvements fix your issue. You can always return to the Stable update channel if you choose.

1
  • 1
    It never worked and it is already for 4-5 years in both VS and VS4Mac. Even it never worked it is still in the IDEs. Hint: It never will work either due to XF design
    – pixel
    Nov 1, 2018 at 22:53
0

The Forms XAML Previewer is still a work in progress and is released as a Preview release. Here is a list of current bug reports, including one I just filed trying to test this myself.

Many of these are private internal bugs, but on my end iOS worked fine for a simple template Forms XAML solution, just the Android would not render but I got an error banner at the top as described in bug #44603

0

Here are a couple troubleshooting steps:

  • Project should be built (compiled) before attempting to preview XAML files
  • The Designer Agent must be set-up the first time you preview a XAML file - a progress indicator will appear in the Previewer, along with progress messages, until this is ready.
  • Try closing and re-opening the XAML file.

  • Invalid XAML: The Android project needs to built before preview can be created. The previewer requires that the project be built before rendering a page. If the error below appears at the top of the preview pane, re-build the application and try again.

enter image description here

Xamarin has some additional documentation on their website for troubleshooting the Xamarin.Forms Previewer

0

Be sure that you install Xamarin.Forms NuGet package >= v2.3 for your Android iOS and PCL projects.

When you get XFPageRendererView as the content of your previewer, try to install the latest Java Development Kit (64 bit version will be OK even though the Visual Studio runs on 32bit). Then go to: Visual Studio > Tools > Options > Xamarin > Android Settings > Change Java Development Kit Location to the newly installed one.

For more information refer to: https://blog.xamarin.com/live-xaml-previewing-with-the-xamarin-forms-previewer/

0

In the latest Xamarin Update, it fixed automatically. Make sure you have installed Java SDK 64 bit version. And you also need to build / rebuild the project before opening the XAML file. For details, you can check my post here. Thanks.

1
  • Sorry but previewer never worked in my experience. Neither in VS nor in VS4Mac. I am using VS4Mac and still not working. I got it once working for a very basic layout and that stopped as well.
    – pixel
    Nov 1, 2018 at 22:56
0

If you load the latest version of Java SDK, at this time, it's 9.x and then Xamarin Forms doesn't support that version.

We went to the Xamarin Forms Live. It worked out of the box.

1
  • Update: Hope this helps. Download the 8.x 64 bit version and the forms previewer works.
    – GaryP
    Mar 6, 2018 at 19:02
0

As many of the other Answers have said Xamarin Forms is in preview right now.

As an alternative I am using LiveXAML. It isn't a form previewer but uses a different, in many cases superior, approach. The tool allows you to make changes to XAML files while your app is running and you see the changes almost immediately reflected in the app. So what you see isn't a preview but a view of the real thing.

This allows you to interactive with you app like you normally would and make changes on the fly.

It is easy to setup and there is a free trial.

  • Not affiliated with LiveXAML, just a happy customer.
1
  • not free and requires code change like Gorilla Player. Not very helpful considering what you (and entire team) has to go trough to get it work
    – pixel
    Nov 1, 2018 at 22:54
0

My previewer did not work whatever I tried. But it starts to work when I creat a new ContentPage in xaml.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.