About InternalsVisibleToAttribute

Eazfuscator.NET

About InternalsVisibleToAttribute

Solution #1. Do not use InternalsVisibleToAttribute at all

#if DEBUG 
[assembly: InternalsVisibleTo(<attribute parameters according to your existing code>)] 
#endif 

Solution #2. Swap with EditorBrowsable attribute

Solution #3. Hide the warning

  1. Open obfuscatable project inside the IDE
  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb
  3. using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "disable warning EF-4001")]
    Imports System
    Imports System.Reflection
    
    <Assembly: Obfuscation(Feature:="disable warning EF-4001")> 
    

Solution #4. Ignore the attribute

  1. Open obfuscatable project inside the IDE
  2. Add new source file to the project and call it ObfuscationSettings.cs (for C#) or ObfuscationSettings.vb (for Visual Basic .NET). You may prefer to use another name instead of ObfuscationSettings.cs or ObfuscationSettings.vb
  3. using System;
    using System.Reflection;
    
    [assembly: Obfuscation(Feature = "ignore InternalsVisibleToAttribute", Exclude = false)]
    Imports System
    Imports System.Reflection
    
    <Assembly: Obfuscation(Feature:="ignore InternalsVisibleToAttribute", Exclude:=False)>