André Krämers Blog

Lösungen für Ihre Probleme

As I’m very interested in new technologies, I recently downloaded – like maybe hundreds of other people – Infragistics NetAdvantage for WPF 2007 Vol 2. My goal was to evaluate Infragistics newest technology.

Unfortunately, my enthusiasm was dampend a little bit, when I tried to run the sample application “xamFeatureBrowser”. Instead of showing the newest and coolest WPF features, the application crashed and displayed the windows error reporting dialog. Actually, this wasn’t what I really expected :-)

3ndmessage

My sales contact at Infragistics confirmed, that the sample application shows this quite unexpected behavior on non English operating systems only.

In order to find a solution for that problem, I opened the xamFeatureBrowser solution in Visual Studio 2005 and started the debugger. Immediately after starting, the following dialog appeared on my screen:

1stmessage

 2ndmessage

  System.IO.IOException was unhandled
  Message="Cannot locate resource  \"app.xaml\"."

Afterwards, the application crashed again. A short research on the internet showed, that this problem mostly occurs if you save a solution with Visual Studio 2008 Beta 1 and try to open it with VS 2005 later – independent of the operating system language. As the application runs fine under English operating systems, this couldn’t be the problem’s root cause.

My next step in hunting down this error was using windows debugging tools, which showed the following exception:

  0:000> .loadby sos mscorwks    0:000> !pe    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll -     PDB symbol for mscorwks.dll not loaded    Exception object: 01429598    Exception type: System.Resources.MissingManifestResourceException    Message: Für die angegebene Kultur oder die neutrale Kultur konnten keine Ressourcen gefunden werden.     Stellen Sie sicher, dass xamFeatureBrowser.g.resources beim Kompilieren richtig in die Assembly     xamFeatureBrowser eingebettet wurde, oder dass die erforderlichen Satellitenassemblys geladen werden    können und vollständig signiert sind.

An exception like this occurs, when the CLR can’t find a resource file for your current culture and there’s no resource file for the invariant culture.

The Solution:

On my system, I’ve got the samples running by following these steps:

  1. Open the xamFeatureBrowser solution. On my system it’s located at: “C:\Users\Public\Documents\Infragistics\NetAdvantage for WPF 2007 Vol. 2\Samples\xamFeatureBrowser”
  2. Change solution configuration from “Debug - Full trust” to “Release”. I’m not sure, if this step is necessary with Visual Studio 2008, too. projectconfiguration
  3. Open app.xaml.cs and add the following constructor:

public App()
{
  CultureInfo objCI = new CultureInfo("en-US");
  Thread.CurrentThread.CurrentCulture = objCI;
  Thread.CurrentThread.CurrentUICulture = objCI;
}

Thanks to heroic, who posted this code in the infragistics forum. 4. Change the file properties of “TableOfContents.xml”. I set Build Action to Content and Copy to Output Directory to Copy always toc5. Run the solution :-) xambrowser

Those 5 steps should do the trick. Let’s hope, that Infragistics fixes the bug in the next version :-)

kick it on DotNetKicks.com

Es gibt 1 Kommentare

Comment by Davide Dolla
Von Davide Dolla | 29.10.2011 21:11
It works fine.Thanks a lot Andre.Davide.