views:

86

answers:

0

I have a WPF application that runs as an add-in in another application. (In this case it is COM based but I don't think it matters for the problem I have)

The application works fine when I run it standalone. When running as add-in there is a problem with resources.

First: (minor)

The "pack:" uri scheme is not available at all. I can work around this but it would be nice to understand why (and if it can be solved)

Second: (showstopper)

XAML resources can't be found (the XAML is found!). The errormessages says that Assembly.GetEntryAssembly() is null (which is understandable) and that I should set Application.ResourceAssembly.

The problem is that my application consists of 2 assemblies which both contain XAML and resources. Which one should I set as resource assembly? I have tried both and neither of them work. (The errormessage just says that the resource can't be found)

The resources that can't be found are normal text with an autogenerated static class. The XAML looks like:

<TextBox Text="{StaticResource my:Texts.ButtonText}">