7.8. Warnings and Errors
Eazfuscator.NET can produce warning and error messages. Generally, every warning and error message can be identified by a special identifier which has the form EF-XXXX. Example identifier: EF-4001.
Please follow the instructions below to disable a specific warning.
Instructions on disabling a specific warning
-
Open obfuscatable project inside the IDE
-
Add new source file to the project and call it
ObfuscationSettings.cs
(for C#) orObfuscationSettings.vb
(for Visual Basic .NET). You may prefer to use another name instead ofObfuscationSettings.cs
orObfuscationSettings.vb
-
Fill
ObfuscationSettings.cs
with the following content (C#):using System;
using System.Reflection;
[assembly: Obfuscation(Feature = "disable warning EF-XXXX")]For Visual Basic .NET, fill
ObfuscationSettings.vb
with the following content:Imports System
Imports System.Reflection
<Assembly: Obfuscation(Feature:="disable warning EF-XXXX")>
EF-XXXX must be changed with an identifier of a warning you want to disable.
Warning suppression directives can be specified at the assembly, class and member levels.
Please follow the instructions below to treat all warnings as errors.
Instructions on making Eazfuscator.NET to treat all warnings as errors
-
Open obfuscatable project inside the IDE
-
Add new source file to the project and call it
ObfuscationSettings.cs
(for C#) orObfuscationSettings.vb
(for Visual Basic .NET). You may prefer to use another name instead ofObfuscationSettings.cs
orObfuscationSettings.vb
-
Fill
ObfuscationSettings.cs
with the following content (C#):using System;
using System.Reflection;
[assembly: Obfuscation(Feature = "treat all warnings as errors")]For Visual Basic .NET, fill
ObfuscationSettings.vb
with the following content:Imports System
Imports System.Reflection
<Assembly: Obfuscation(Feature:="treat all warnings as errors")>
There is a command-line option --warnings-as-errors all
which can be specified to achieve this functionality.
Sometimes it can be useful to treat just a specific warning as an error. Please follow the instructions below to achieve this.
Instructions on making Eazfuscator.NET to treat a specific warning as an error
-
Open obfuscatable project inside the IDE
-
Add new source file to the project and call it
ObfuscationSettings.cs
(for C#) orObfuscationSettings.vb
(for Visual Basic .NET). You may prefer to use another name instead ofObfuscationSettings.cs
orObfuscationSettings.vb
-
Fill
ObfuscationSettings.cs
with the following content (C#):using System;
using System.Reflection;
[assembly: Obfuscation(Feature = "treat warning EF-XXXX as error")]For Visual Basic .NET, fill
ObfuscationSettings.vb
with the following content:Imports System
Imports System.Reflection
<Assembly: Obfuscation(Feature:="treat warning EF-XXXX as error")>
EF-XXXX must be changed with an identifier of a warning you want to treat as an error.
There is --warnings-as-errors
command-line option which can be specified to achieve this functionality.