views:

40

answers:

1

I have an error very similar to the one addressed in this question. I am trying to deploy a small c#/Xaml utility on 6 work machines. 4 of the machines run the utility successfully and 2 do not. All machines are windows XP and have .Net frameworks 1-4 installed (my app is compiled against 4.0 and all machines have both client and extended redistributables installed).

On running the utility, I get the standard "... has encountered a problem and needs to close." On viewing the error report contents, the problem seems to occur in System.Windows.Markup.XamlParse.

I have run .Net 4.0 online installer in "repair" mode and still I get the same problem. I have tried all the suggestions from the post linked above:

  • The file is deployed alongside a DLL which is present and correct.
  • UI cultures are identical.
  • All computers are up to date from Microsoft Update.
  • The assembly does not contain any external resources which are referenced in XAML.

I don't really know where to start with debugging this one. Any suggestions?

A: 

I would suggest setting up remote debugging on the machines that are having the problem and then adding this to the startup code:

while (!System.Diagnostics.Debugger.IsAttached)
{
    Thread.Sleep(100);
}
JohnForDummies
Thanks for this suggestion. Unfortunately, because I have just done this for work but am not a professional programmer, I am using the Express Editions.
AJ
Ah. Gotcha. I was in the same boat as you recently, and could not attach to a system with remote debugger... I ended up just writing to a log file each step as the application loaded, with info regarding where it was in the code, and any pertinent variables and their values. After one launch, I found the problem.
JohnForDummies
Have still go the issue *but*, I installed VS2010 express on one of the machines that doesn't run my program. VS debugger crashes on trying to launch even a simple WPF test project, so I have a broken installation of something on that machine. A repair mode install of .Net 4.0 fails to fix it, so it may be a case of a fresh XP install needed on that machine. Thanks very much for your suggestions.Answer accepted, because if my machine wasn't broken, I think your logging suggestion would have done the trick!
AJ