我的项目文件夹中有两个项目:
HtSuite.UWP
| Library
HtSuite.UWP.Leitstand
| Applicaton
在
Library
是 UserControl
NamePasswordControl
,我可以在 XAML | Designer
中毫无问题地编辑它.当我放置
NamePasswordControl
在我的 LoginView.xaml
(也在 Library
中),我收到以下错误:the element "passwordView" could not be displayed due to missing assemblies. After building the application, you may be able to view this control
当我运行
Application
,一切都按预期工作。 到目前为止我尝试了以下步骤(没有成功):
dotnet clean
dotnet restore
v16.6.0
) 并尝试了 v16.7.0 预览版1 有人知道如何修复预览吗?
具有相同行为的最小测试项目:
https://files.dominic-jonas.de/stackoverflow/ClassLibrary2.zip
一个类库,其中有一个 UserControl 和一个应在其上显示的页面。但是,错误也显示在那里,无法预览
日志
最佳答案
这个问题是微软的一个bug,在developer community中讨论过。 .
当时它是针对 Windows 10 和 VS 2017 的,据说最新版本已经修复了它。这个问题有可能在以后的版本中再次出现,所以你也应该在开发者社区发一张票。
关于c# - VisualStudio UWP/XAML 设计器未显示 UserControl |由于缺少程序集,无法显示元素 "foo",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62042158/