I'm writing a WinRT-based library in C# (here's the source code) where I expose a custom XAML control called AppView
. When I compile the library locally and use it from my sample app, it seems to be working fine. However, if I upload it to NuGet and use it like this:
public MainPage()
{
new AppView();
this.InitializeComponent();
}
then I get a XamlParseException
when the constructor is called. I followed this suggestion of breaking in the debugger when it was thrown, but unfortunately it just says 'XAML parsing failed.' and the InnerException
is null.
These problems have been happening ever since I factored out part of my library into another DLL. So far, I have tried:
- including the other DLL (commit)
- including everything in the
Release
directory (commit) - publishing the other DLL as a separate NuGet package
If you're interested in repro-ing this for yourself, here's the link to the package on NuGet.
edit: Added the [wpf] tag since that platform is also closely related to XAML.