#ExternalSource Directive

Indicates a mapping between specific lines of source code and text external to the source.

#ExternalSource( StringLiteral , IntLiteral )
    [ LogicalLine+ ]
#End ExternalSource


  • StringLiteral
    The path to the external source.

  • IntLiteral
    The line number of the first line of the external source.

  • LogicalLine
    The line where the error occurs in the external source.

  • #End ExternalSource
    Terminates the #ExternalSource block.


This directive is used only by the compiler and the debugger.

A source file may include external source directives, which indicate a mapping between specific lines of code in the source file and text external to the source, such as an .aspx file. If errors are encountered in the designated source code during compilation, they are identified as coming from the external source.

External source directives have no effect on compilation and cannot be nested. They are intended for internal use by the application only.

See Also

Other Resources

Conditional Compilation (Visual Basic)