'#ExternalSource' statement must end with a matching '#End ExternalSource'

The #ExternalSource directive references outside code, enabling the compiler to accurately report when exceptions occur within that code. An #ExternalSource block must begin with #ExternalSource and end with #End ExternalSource.

Error ID: BC30579

To correct this error

  1. Add #End ExternalSource to the appropriate location in your code.

  2. Remove the initial #ExternalSource if it is unnecessary.

See Also

Reference

#ExternalSource Directive

Other Resources

Conditional Compilation (Visual Basic)