7.2. Probing Paths
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 necessary 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.
To define a probing path, you should apply an attribute to your assembly. In order to do that, you can use the instructions below.
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#) or
ObfuscationSettings.vb(for Visual Basic .NET). You may prefer to use another name instead of
ObfuscationSettings.cswith the following content (C#):
[assembly: Obfuscation(Feature = @"assembly probing path C:\Example\Lib")]
For Visual Basic .NET, fill
ObfuscationSettings.vbwith the following content:
<Assembly: Obfuscation(Feature:="assembly probing path C:\Example\Lib")>Note
C:\Example\Libwith 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:
C:\Example\Lib with the directory name you want to be probed for assembly dependencies.
Do not put a trailing slash at the end of the path, otherwise the operating system will interpret it as an escape symbol.