How can we help you today? How can we help you today?

Build 451 - Reference with satellite assembly not working

Hi!

I am using a third-party WPF controls library, and trying to track down some bugs. However, if I try to use Reflector on this library, at runtime the application fails during the loading of the Baml. I get the following exception:
Fehler bei Objektinitialisierung (ISupportInitialize.EndInit). Die Satellitenassembly mit dem Namen xxx.resources.dll, PublicKeyToken= für die Fallbackkultur en-US konnte entweder nicht gefunden oder nicht geladen werden. Dies ist normalerweise ein Setup-Problem. Versuchen Sie, die Anwendung neu zu installieren oder zu reparieren.  Fehler in Objekt "xxx.Controls.yyy" in Markupdatei "zzz;component/zzz.xaml", Zeile 85, Position 15.

The inner exception is:
Die Satellitenassembly mit dem Namen xxx.resources.dll, PublicKeyToken= für die Fallbackkultur en-US konnte entweder nicht gefunden oder nicht geladen werden. Dies ist normalerweise ein Setup-Problem. Versuchen Sie, die Anwendung neu zu installieren oder zu reparieren.

with the inner exceptions stacktrace
bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   bei System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)
   bei System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   bei System.Resources.ResourceManager.GetStream(String name, CultureInfo culture)
   bei System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(Assembly assembly, String assemblyName, String resourceName, Boolean isTraceEnabled)
   bei System.Windows.SystemResources.ResourceDictionaries.LoadThemedDictionary(Boolean isTraceEnabled)
   bei System.Windows.SystemResources.FindDictionaryResource(Object key, Type typeKey, ResourceKey resourceKey, Boolean isTraceEnabled, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference, Boolean& canCache)
   bei System.Windows.SystemResources.FindResourceInternal(Object key, Boolean allowDeferredResourceReference, Boolean mustReturnDeferredResourceReference)
   bei System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce)
   bei System.Windows.FrameworkElement.UpdateThemeStyleProperty()
   bei System.Windows.FrameworkElement.OnInitialized(EventArgs e)
   bei System.Windows.FrameworkElement.TryFireInitialized()
   bei System.Windows.FrameworkElement.EndInit()
   bei System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element)


Translated: The satellite assembly with the name xxx.resources.dll, PublicKeyToken= [yes, the token is empty] for the fallback culture en-US could either not be found or not be loaded.

The reference itself is to xxx.dll; both the Dll and the resources Dll are in the GAC. I tried also adding the resources Dll as reference and have Reflector decompile both of them, but it makes no difference.
DanielRose
0

Comments

3 comments

  • Alex D
    As I said in my other conversation with you at http://www.red-gate.com/messageboard/vi ... php?t=9877 we need to regenerate your main assembly to add a debugger signature. This version is distinguished from the real version because it has no public key (as you noticed).

    I can see how the satellite assembly wouldn't get loaded, because it no longer has the same (lack of) public key as the main assembly. You were right to try referencing and decompiling the satellite assembly, that's what I would have tried. The reason it didn't work I believe is because the satellite assembly does have a debugger signature, so reflector didn't regenerate it.

    A fix might be to strip the public key from the satellite assembly, then put it in the build output of your project. This looks a hopeful way of doing this: http://www.codeproject.com/KB/security/ ... ove20.aspx

    Let me know how that goes if you have time to do that.

    I'll look at whether it's possible to automatically detect this situation and fix it.

    Thanks,
    Alex D
    0
  • DanielRose
    Hi Alex,

    I put the resources assembly (with stripped strong-name) in the target location of the build, but it didn't change anything (still the same error).
    DanielRose
    0
  • Alex D
    That's a shame, it might mean that it's not possible to have an automatic fix for this. I'll give it a try though.
    Alex D
    0

Add comment

Please sign in to leave a comment.