Visual Studio 2017 xaml 设计器不可用 [英] Visual Studio 2017 xaml designer not available
问题描述
使用 Visual Studio Professional 2017(版本 15.2 26430.16),当我打开我开发的桌面 UI 的 xaml 文件时,我看不到 xaml 设计器(我只能看到原始 xaml 代码).这是新行为,可能是因为我进行了系统清理,所以也许我删除了我需要的 SDK 或类似的东西?
Using Visual Studio Professional 2017 (Release 15.2 26430.16), when I open a xaml file for a desktop UI that I have developed, I can no longer see the xaml designer (I only see the raw xaml code). This is new behaviour and may be due to me having a system clean-out, so maybe I removed an SDK that I need or something like that?
是否有任何可以检查警告等的 Visual Studio 错误日志?
Are there any Visual Studio error logs I can check for warnings etc?
推荐答案
在 Visual Studio 2017 安装程序中,我选择了所有 SDK 并安装了缺少的那些.这本身并不能解决问题,但 Visual Studio 2017 安装程序(可从汉堡包"下拉菜单中获得)进行的后续修复"解决了.
In the Visual Studio 2017 Installer, I selected all of the SDKs and installed the missing ones. This did not fix the problem by itself, but a subsequent 'repair' from the Visual Studio 2017 Installer (available from the 'hamburger' drop-down) did.
有时,从安装程序中添加或删除 SDK 会切换工具"->选项"->XAML 设计器"->常规"下的启用 XAML 设计器"复选框(或者可能是修复步骤将其重新打开),因此请确保这是检查.
Sometimes, adding or removing SDKs from the Installer toggles the 'Enable XAML Designer' check box under Tools -> Options -> XAML Designer -> General (or perhaps it was the repair step that turned this back on), so ensure that this is checked.
这篇关于Visual Studio 2017 xaml 设计器不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!