简体   繁体   中英

"Visual Studio requires a newer version of Windows to display this content."

Getting the error "Visual Studio requires a newer version of Windows to display this content." when using the XAML designer tool in Xamarin. Any ideas on how I'd go about tracking down the source of this? I'm using Windows 10, and Visual Studio 2015.

示例图像

Update from 14th September 2016

The live preview for Xamarin forms is now available in the stable channel. https://developer.xamarin.com/releases/studio/xamarin.studio_6.1/xamarin.studio_6.1/#Xamarin_Forms_Previewer

Update from 27th April 2016

Xamarin has just announced a live preview for Xamarin.Forms on the Evolve 2016 Keynote. It is included in the alpha channel, and you need to update Xamarin.Forms to 2.3 prerelease.

Original Answer

Xamarin.Forms XAML is not WPF XAML. There is currently no editor for this dialect.

There is not yet a visual designer for generating XAML in Xamarin.Forms applications, so all XAML must be hand-written.

The only way to have a preview is currently Gorilla Player . But the community is requesting it strongly. It's the feature request with the most votes.

I was facing the same problem when I was loading the MainPage.xaml file of my UWP application in my Visual Studio 2019 .

在此处输入图片说明

I was sure that I have the version 1903 (10.0.18362.0) in my system, so the problem was not that. To fix this error, this is what I did.

  1. Install the version 1809 (10.0.17763.0), to do this, click on the visual studio installer, and select your Visual Studio, and then click on Modify
  2. Click on the Individual Components and then select Windows 10 SDK (10.0.17763.0)

在此处输入图片说明

  1. Once the installation is done, open your project in the Visual Studio and then click on your project and then Properties.
  2. Select the Target version 1809 (10.0.17763.0) under Targeting

在此处输入图片说明

Now you should be able to see the design view of your xaml file. Hope it helps.

This answer is based on the Title (No Xamarin)

I found this Choose a UWP Version link to be helpful in solving the problem.

Go to:

  1. Project Menu
  2. Project Properties
  3. Change both Target and Min versions to Build 10240
  4. XAML designer is back!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM