VisualStudio UWP/XAML Designer not showing UserControl | The element "foo" could not be displayed due to missing assemblies

Viewed 846

I have two Projects in my project folder:

  • HtSuite.UWP | Library
  • HtSuite.UWP.Leitstand | Applicaton

In the Library is an UserControl NamePasswordControl, which I can edit without any problems in the XAML | Designer.

enter image description here

When I place the NamePasswordControl on my LoginView.xaml (which is also in the Library), I got the following error:

the element "passwordView" could not be displayed due to missing assemblies. After building the application, you may be able to view this control

enter image description here

When I run the Application, everything is working as expected.

enter image description here

The following steps I tried so far (without success):

  • clean solution
  • rebuild project
  • deleted cache
  • dotnet clean
  • dotnet restore
  • restarted windows
  • updated VisualStudio (v16.6.0) and tried v16.7.0 preview 1

Anyone know how I can get the preview fixed?


minimal test project with same behavior:

https://files.dominic-jonas.de/stackoverflow/ClassLibrary2.zip

A class library in which there is a UserControl and a page on which should be displayed. However, the error is also displayed there and a preview is not possible


Log

  • 28.05.2020 Nico Zhu - MSFT could successfully load the preview of the TestProject (visual studio 2017 v15.9.17). I could not display the preview with vs2017.

1 Answers

This issue is a bug of microsoft and was discussed in the developer community.

It was addressed to windows 10 and VS 2017 back at the time and it was said that the latest version fixed it already. It is possible that this problem reoccured in later version so you should post a ticket at the developer community as well.

Related