-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DialogHost: XamlObjectWriterException - Unresolved reference 'ContentCoverBorder' #3522
Comments
Additional context: Above sources seem to indicate that the use of |
I am experiencing the same issue with my app when I try to debug it. |
I have attempted to reproduce the issue on a new project but the problem does not occur. |
@MichelMichels @alexachso Can any of you provide a small sample that reproduces this? I am unable to reproduce it in a simple WPF app with a I am using the latest code (i.e. project reference rather than nuget package). I also tried with the official nuget packages, and still cannot repro the issue. |
HI @nicolaihenriksen, I cannot reproduce either. I remember seeing it and then I commented on this issue on 29th of April. If I checkout the commits I did that day of my app and run the app, the binding failure is no longer present. Maybe it is worth mentioning that I run Visual Studio preview. Since I checkout the exact commit that I remember I had the binding failure, the problem should reproduce, but the only thing different from then and now is that since then I updated the visual studio preview version. I don't remember on which version on Visual studio preview I was on 29th of April. :( I'll keep an eye on this, and if I re-encounter it I'll let you know. |
@nicolaihenriksen @alexachso this could be the answer. I also run the Microsoft Visual Studio preview edition. I'll update to latest version and check if the issue still occurs. |
Hi @MichelMichels do you still see this binding failure today? If so, maybe it is worth noting the version of you Visual studio preview you are on before updating it :) |
@alexachso sorry, I saw your comment too late. I've already updated my Visual Studio. But even after updating, I see following behavior:
The demo I'm running uses following xaml in <Window
x:Class="MDIX.TestApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:MDIX.TestApp"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="MainWindow"
Width="800"
Height="450"
Style="{StaticResource MaterialDesignWindow}"
mc:Ignorable="d">
<Grid>
<materialDesign:DialogHost />
</Grid>
</Window> So, the problem seems localized entirely in the preview version. |
Ok, I reproduced it.
Here is a zip file with a basic project that does it: So do not forget, in order to have this exception appear, the "System.Xaml.XamlObjectWriterException" option must be enabled in the Exception Setting and also the option "Enable Just My Code" must be disabled. I also tested with MDIX version 5.0.1-ci662 and it does the same. |
@alexachso @MichelMichels Awesome work guys! I will try to reproduce it with this info, and see if I can find some sort of fix that does not reintroduce the binding error. |
@alexachso @MichelMichels I can now reproduce the issue 👍 Now comes the tough part, finding a valid solution 😄 |
It is strange that it only occurs in the preview version. Could it be that preview version is running a newer runtime? |
@MichelMichels I am seeing some really weird things happening. I can repro the issue, then I change one small thing and the issue is gone. Then I change it back and the issue is still gone. Sometimes if I do a full clean (´git clean -xdf`) I can then reproduce it again, but not every time. That makes it rather difficult to know when/if you have a working fix for it... I have seen it in both the preview and the non-preview versions, but not consistently. |
@MichelMichels As it stands right now (on my PC), simply reverting bfe348f ensures the exception is not thrown, but it does not re-introduce the binding errors that was the original issue. Very confusing... |
Bug explanation
When running a Window with nothing else but a
DialogHost
, following exception gets thrown:System.Xaml.XamlObjectWriterException in System.Xaml.dll
Additional text:
Unresolved reference 'ContentCoverBorder
.It has something to do with this PR: bfe348f
When I revert this change, the issue goes away but the binding error shows up again.
Version
5.0.0
The text was updated successfully, but these errors were encountered: