0

I received the exception:

Exception thrown: 'System.Resources.MissingManifestResourceException' in mscorlib.dll Additional information: Could not find any resources appropriate for the specified culture or the neutral culture. Make sure "Arction.WPF.LightningChartUltimate.g.resources" was correctly embedded or linked into assembly "Arction.WPF.LightningChartUltimate" at compile time, or that all the satellite assemblies required are loadable and fully signed.

The exception occurs when I try to expand a node from WpfToolkit-PropertyGrid with selected object: LightningChartUltimate. The problem come from either 2 properties that are both "enum". If I prevent both enum to be processed as properties from the propertyGrid, everything is fine, no more exception.

When I look at the stack, I can find that WPF is looking for the file: "themes\generic.baml".

Does anybody have an idea of the source of the problem?

As additional informations (2015-11-17): I've tested with another app which gave me a different behavior, it does not searches for the themes/generic.baml. But both applications gave me same results for theses:

My main app:

  • Debug.Print(Thread.CurrentThread.CurrentCulture.ToString()); = fr-CA
  • Debug.Print(Thread.CurrentThread.CurrentUICulture.ToString()); = en-US

My little test app:

  • Debug.Print(Thread.CurrentThread.CurrentCulture.ToString()); = fr-CA
  • Debug.Print(Thread.CurrentThread.CurrentUICulture.ToString()); = en-US

The stack is composed only from Microsoft code:

mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.HandleResourceStreamMissing(string fileName)    Unknown
    mscorlib.dll!System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo culture, System.Collections.Generic.Dictionary<string, System.Resources.ResourceSet> localResourceSets, bool tryParents, bool createIfNotExists, ref System.Threading.StackCrawlMark stackMark)   Unknown
    mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo requestedCulture, bool createIfNotExists, bool tryParents, ref System.Threading.StackCrawlMark stackMark) Unknown
    mscorlib.dll!System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents) Unknown
    mscorlib.dll!System.Resources.ResourceManager.GetObject(string name, System.Globalization.CultureInfo culture, bool wrapUnmanagedMemStream) Unknown
    mscorlib.dll!System.Resources.ResourceManager.GetStream(string name, System.Globalization.CultureInfo culture)  Unknown
>   PresentationFramework.dll!System.Windows.SystemResources.ResourceDictionaries.LoadDictionary(System.Reflection.Assembly assembly, string assemblyName, string resourceName, bool isTraceEnabled) Line 775   C#
    PresentationFramework.dll!System.Windows.SystemResources.ResourceDictionaries.LoadGenericDictionary(bool isTraceEnabled) Line 637   C#
    PresentationFramework.dll!System.Windows.SystemResources.FindDictionaryResource(object key, System.Type typeKey, System.Windows.ResourceKey resourceKey, bool isTraceEnabled, bool allowDeferredResourceReference, bool mustReturnDeferredResourceReference, out bool canCache) Line 316    C#
    PresentationFramework.dll!System.Windows.SystemResources.FindResourceInternal(object key, bool allowDeferredResourceReference, bool mustReturnDeferredResourceReference) Line 176   C#
    PresentationFramework.dll!MS.Internal.Helper.FindTemplateResourceFromAppOrSystem(System.Windows.DependencyObject target, System.Collections.ArrayList keys, int exactMatch, ref int bestMatch) Line 130 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.FindTemplateResourceInternal(System.Windows.DependencyObject target, object item, System.Type templateType) Line 1476 C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.DefaultSelector.SelectTemplate(object item, System.Windows.DependencyObject container) Line 1156 C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.ChooseTemplate() Line 547    C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.EnsureTemplate() Line 836    C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.OnPreApplyTemplate() Line 480    C#
    PresentationFramework.dll!System.Windows.FrameworkElement.ApplyTemplate() Line 356  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4280  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) Line 1430 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) Line 1282 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) Line 1245  C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) Line 653 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) Line 548   C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size constraint) Line 495 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) Line 1430 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) Line 1282 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) Line 1245  C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) Line 653 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureChild(ref System.Windows.Controls.Primitives.IItemContainerGenerator generator, ref System.Windows.Controls.Primitives.IContainItemStorage itemStorageProvider, ref System.Windows.Controls.Primitives.IContainItemStorage parentItemStorageProvider, ref object parentItem, ref bool hasUniformOrAverageContainerSizeBeenSet, ref double computedUniformOrAverageContainerSize, ref bool computedAreContainersUniformlySized, ref System.Collections.IList items, ref object item, ref System.Collections.IList children, ref int childIndex, ref bool visualOrderChanged, ref bool isHorizontal, ref System.Windows.Size childConstraint, ref System.Windows.Rect viewport, ref System.Windows.Controls.VirtualizationCacheLength cacheSize, ref System.Windows.Controls.VirtualizationCacheLengthUnit cacheUnit, ref bool foundFirstItemInViewport, ref double firstItemInViewportOffset, ref System.Windows.Size stackPixelSize, ref System.Windows.Size stackPixelSizeInViewport, ref System.Windows.Size stackPixelSizeInCacheBeforeViewport, ref System.Windows.Size stackPixelSizeInCacheAfterViewport, ref System.Windows.Size stackLogicalSize, ref System.Windows.Size stackLogicalSizeInViewport, ref System.Windows.Size stackLogicalSizeInCacheBeforeViewport, ref System.Windows.Size stackLogicalSizeInCacheAfterViewport, ref bool mustDisableVirtualization, bool isBeforeFirstItem, bool isAfterFirstItem, bool isAfterLastItem, bool skipActualMeasure, bool skipGeneration, ref bool hasBringIntoViewContainerBeenMeasured, ref bool hasVirtualizingChildren) Line 6830    C#
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureOverrideImpl(System.Windows.Size constraint, ref double? lastPageSafeOffset, ref System.Collections.Generic.List<double> previouslyMeasuredOffsets, ref double? lastPagePixelSize, bool remeasure) Line 2251    C#
    PresentationFramework.dll!System.Windows.Controls.VirtualizingStackPanel.MeasureOverride(System.Windows.Size constraint) Line 1708  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) Line 548   C#
    PresentationFramework.dll!System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size constraint) Line 73    C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) Line 548   C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size constraint) Line 495 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCell(int cell, bool forceInfinityV) Line 1430 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV, out bool hasDesiredSizeUChanged) Line 1282 C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureCellsGroup(int cellsHead, System.Windows.Size referenceSize, bool ignoreDesiredSizeU, bool forceInfinityV) Line 1245  C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) Line 653 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.StackPanel.StackMeasureHelper(System.Windows.Controls.IStackMeasure measureElement, System.Windows.Controls.IStackMeasureScrollData scrollData, System.Windows.Size constraint) Line 584  C#
    PresentationFramework.dll!System.Windows.Controls.StackPanel.MeasureOverride(System.Windows.Size constraint) Line 524   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) Line 548   C#
    PresentationFramework.dll!System.Windows.Controls.ItemsPresenter.MeasureOverride(System.Windows.Size constraint) Line 73    C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Control.MeasureOverride(System.Windows.Size constraint) Line 712  C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!MS.Internal.Helper.MeasureElementWithSingleChild(System.Windows.UIElement element, System.Windows.Size constraint) Line 548   C#
    PresentationFramework.dll!System.Windows.Controls.ContentPresenter.MeasureOverride(System.Windows.Size constraint) Line 495 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Border.MeasureOverride(System.Windows.Size constraint) Line 241   C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationFramework.dll!System.Windows.Controls.Grid.MeasureOverride(System.Windows.Size constraint) Line 435 C#
    PresentationFramework.dll!System.Windows.FrameworkElement.MeasureCore(System.Windows.Size availableSize) Line 4363  C#
    PresentationCore.dll!System.Windows.UIElement.Measure(System.Windows.Size availableSize) Line 664   C#
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayout() Line 317    C#
    PresentationCore.dll!System.Windows.ContextLayoutManager.UpdateLayoutCallback(object arg) Line 589  C#
    PresentationCore.dll!System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() Line 1562    C#
    PresentationCore.dll!System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() Line 1949  C#
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandlerCore(object resizedCompositionTarget) Line 1826  C#
    PresentationCore.dll!System.Windows.Media.MediaContext.RenderMessageHandler(object resizedCompositionTarget) Line 1721  C#
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Line 104 C#
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Line 37 C#
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeImpl() Line 583  C#
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(object state) Line 528 C#
    mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx)   Unknown
    mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) Unknown
    WindowsBase.dll!System.Windows.Threading.DispatcherOperation.Invoke() Line 441  C#
    WindowsBase.dll!System.Windows.Threading.Dispatcher.ProcessQueue() Line 2232    C#
    WindowsBase.dll!System.Windows.Threading.Dispatcher.WndProcHook(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Line 2485    C#
    WindowsBase.dll!MS.Win32.HwndWrapper.WndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam, ref bool handled) Line 341    C#
    WindowsBase.dll!MS.Win32.HwndSubclass.DispatcherCallbackOperation(object o) Line 494    C#
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate callback, object args, int numArgs) Line 104 C#
    WindowsBase.dll!System.Windows.Threading.ExceptionWrapper.TryCatchWhen(object source, System.Delegate callback, object args, int numArgs, System.Delegate catchHandler) Line 37 C#
    WindowsBase.dll!System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority priority, System.TimeSpan timeout, System.Delegate method, object args, int numArgs) Line 1445 C#
    WindowsBase.dll!MS.Win32.HwndSubclass.SubclassWndProc(System.IntPtr hwnd, int msg, System.IntPtr wParam, System.IntPtr lParam) Line 392 C#
    [Native to Managed Transition]  
    [Managed to Native Transition]  
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame frame) Line 2281 C#
    WindowsBase.dll!System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame frame) Line 369  C#
    PresentationFramework.dll!System.Windows.Application.RunDispatcher(object ignore) Line 2756 C#
    PresentationFramework.dll!System.Windows.Application.RunInternal(System.Windows.Window window) Line 1845    C#
    PresentationFramework.dll!System.Windows.Application.Run(System.Windows.Window window) Line 261 C#
    PresentationFramework.dll!System.Windows.Application.Run() Line 222 C#
    ParametricStudyAnalysis.exe!ParametricStudyAnalysis.App.Main()  C#
Eric Ouellet
  • 10,996
  • 11
  • 84
  • 119

1 Answers1

1

Arction.WPF.LightningChartUltimate does not use any templates, styles or theme based resources in their assembly. So if the assembly is looking for themes\generic.baml (a compiled version of generic.xaml) it is because their code must contain a wrong ThemeInfoAttribute definition in their AssemblyInfo.cs code file.

Verify for the following code in their AssemblyInfo.cs file:

[assembly: ThemeInfo(
    ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
    //(used if a resource is not found in the page, 
    // or application resource dictionaries)
    ResourceDictionaryLocation.None //where the generic resource dictionary is located
    //(used if a resource is not found in the page, 
    // app, or any theme specific resource dictionaries)
)]

Be sure that the second parameter is ResourceDictionaryLocation.None The default value is ResourceDictionaryLocation.SourceAssembly and they could have easily forgot to adjust it's value.

  • Sounds very good! I will give a try... Wouldn't be only the second parameter that I should check in my case (that impact themes/generic.baml)? – Eric Ouellet Nov 16 '15 at 20:28
  • I removed the ThemeInfo attribute and It also worked fine (suggested by Pasi, the owner of LightningChart). – Eric Ouellet Nov 17 '15 at 14:25