Skip to main content
Version: 2023.3

12.5. "Option Strict Off" Compatibility for VB.NET


By default, the Visual Basic .NET compiler does not enforce strict data typing and uses late binding to access methods, properties and fields of the classes. This is somehow simplifies the coding for certain kind of people but it has several implications:

  • The resulting application has a greater chance of errors during run time
  • Late binding is considerably slower than a direct strongly-typed access
  • Late binding may break after obfuscation

That's why a very good advice for Visual Basic .NET programmers is to use Option Strict On for their programs. Unfortunately, it is not always possible due to legacy code or personal long-term preferences that are hard to change.

12.5.2.¬†Compatibility Mode‚Äč

Eazfuscator.NET provides a special compatibility mode that allows to workaround the issues with late binding. It comes at the expense of a lower obfuscation coverage but your code remains functional and runs perfectly after obfuscation.


Instructions on activating Option Strict Off compatibility mode for VB.NET

  1. Open obfuscatable project inside the IDE

  2. Add new source file to the project and call it ObfuscationSettings.vb. You may prefer to use another name instead of ObfuscationSettings.vb

  3. Fill ObfuscationSettings.vb with the following content:

    Imports System
    Imports System.Reflection

    <Assembly: Obfuscation(Feature:="vb option strict off compatibility", Exclude:=False)>