CSharpCodeProvider: Stack trace line numbers on exceptions?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QmVuIERpbHRz?=

    CSharpCodeProvider: Stack trace line numbers on exceptions?

    I'm using C# as a sort of scripting language by having text entered by my
    user compiled using the CSharpCodeProvi der and run, with references to an
    assembly that has utility functions in it.

    When an exception is thrown by my dynamically-compiled assembly, I can get a
    stack trace on the exception, but it doesn't show what line the error
    occurred on. I need to be able to tell my user where their error occurred.

    It doesn't seem to matter if IncludeDebugInf ormation is true or false on my
    CompilerParamet ers. I tried compiling from temporary files rather than
    directly from a string in memory, but it had no effect.

    How can I get line numbers on stack traces for exceptions thrown by
    dynamically-compiled assemblies?


    ~BenDilts( void );
Working...