Probing paths is a set of places at the file system where Eazfuscator.NET can search for dependencies of input assembly. Eazfuscator.NET is smart enough to deduct these paths from installed assemblies and from project settings, however it might be neccessary to define probing paths manually when some complex scenario is involved.
There are two ways to define probing paths: by declarative obfuscation attributes or by command line option.
Instructions on defining the probing path by declarative obfuscation attribute
- 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 = @"assembly probing path C:\Example\Lib")]
For Visual Basic .NET, fill
ObfuscationSettings.vb
with the following content:Imports System Imports System.Reflection <Assembly: Obfuscation(Feature:="assembly probing path C:\Example\Lib")>
Note Change
C:\Example\Lib
with the directory name you want to be probed for assembly dependencies.Tip It is recommended to use relative directory paths with script variables:
[assembly: Obfuscation(Feature = @"assembly probing path $(InputDir)\Lib")]
Tip If you want to define several probing paths then just add several attributes:
[assembly: Obfuscation(Feature = @"assembly probing path C:\Example\Lib1")] [assembly: Obfuscation(Feature = @"assembly probing path C:\Example\Lib2")] …
There is a command line option --probing-paths "C:\Example\Lib"
which can be specified to achieve this functionality.
If you want to define several probing paths then please use semicolon as a list separator: --probing-paths "C:\Example\Lib1;C:\Example\Lib2"
.
Note | |
---|---|
Change |
Warning | |
---|---|
Do not put a trailing slash at the end of the path, otherwise the operating system will interpret it as an escape symbol. |