Option Strict Custom can only be used as an option to the command-line compiler (vbc.exe)

The Option Strict statement takes only On and Off as arguments; Option Strict Custom is not allowed.

Use the /optionstrict:custom compiler option to warn when strict language semantics are not respected.

Error ID: BC31141

To correct this error

  1. Remove Option Strict Custom from the source code.

  2. Specify the /optionstrict:custom option. For more information, see /optionstrict.

See Also

Reference

Option (Visual Basic)

Option Strict Statement

/optionstrict