Many .NET applications use resources to store application data such as localized strings, images, icons, and other content. These resources may be embedded directly in an assembly or stored in satellite assemblies for localization.
When Renaming changes the names of types associated with these resources, Dotfuscator automatically updates the corresponding resource references to ensure the application continues to function correctly.
In most cases, no additional configuration is required.
Managed Resources
Managed resources are embedded within a .NET assembly and are accessed through the .NET resource management APIs.
During Renaming, Dotfuscator updates resource references whenever the associated type names change, ensuring that resources can still be located at runtime.
Embedded Resources
If resources are embedded in the same assembly as the code that references them, Dotfuscator automatically updates the resource names during protection. No additional configuration is required.
External Resource Files
If your application uses external resource files, ensure that the resource files remain in the same location as the assemblies that reference them during the protection process.
Resources in Referenced Assemblies
If resources are embedded in a different assembly than the code that accesses them, include both assemblies in the same Dotfuscator configuration.
Protecting the assemblies together allows Dotfuscator to update resource references consistently across assembly boundaries.
Satellite Assemblies
Dotfuscator automatically detects and processes satellite assemblies using the same conventions as the .NET runtime. You do not need to add satellite assemblies individually to your configuration.
During protection, Dotfuscator updates localized resource references to remain synchronized with your culture neutral resources in the main assembly.
Best Practices
- Protect assemblies that share resources in the same Dotfuscator configuration whenever possible.
- Keep external resource files with the assemblies that reference them during protection.
- Preserve the standard directory structure for satellite assemblies so they can be discovered correctly.
- Test localized versions of your application after protection to verify that resources are loaded correctly.