0

I have a question. Sometimes, there are occurring some side-by-side errors. One help to get the solution for this type of errors, there is a nice tool, called sxstrace.exe.

So when I start my program (TestProgram.exe), which has some errors in the manifest file, so an error is popping up, then I can use sxstrace to get the information, why this error occurs.

But I have one problem. When I start a process with sxstrace.exe in C#, and start my program (TestProgram.exe) with the manifest failure, sxstrace.exe will do not trace any error. Starting sxstrace.exe from shell, it will trace all errors.

Here is the question: Why is that? How can I start sxstrace.exe from C# so it will trace all errors?

EDIT: As far as the C#-program (which is starting a sxstrace process) is starting with admin rights, I suppose, that the sxstrace process also starts with admin rights.

starki
  • 57
  • 7
  • I'm curious why you think you need a third party tool to get StackTrace.. when .Net Framework allows you to expose that..[C# MSDN StackTrace Class](http://msdn.microsoft.com/en-us/library/system.diagnostics.stacktrace%28v=vs.110%29.aspx) – MethodMan Jan 20 '15 at 16:42
  • 2
    Look in the Windows Application event log first, sxstrace.exe doesn't have a lot of compelling features beyond that. – Hans Passant Jan 20 '15 at 17:32
  • What cmd line do you use to start sxsrace? – Eugene Jan 20 '15 at 20:13
  • 1
    @MethodMan, sxstrace has nothing to do with stack trace, it is for monitoring native assembly loading. – Eugene Jan 20 '15 at 20:14

1 Answers1

-1

OK, here is the answer to my question: In my C#-Code, I called my TestProgram.exe (which has the Side-by-Side-Error) with the Property UseShellExecute = false. I had to change it to true.

starki
  • 57
  • 7