Compressing and encrypting managed resources
Published 31 December 2012
Compressing resources used in your code makes the code more efficient, and encrypting resources used in your code makes the code harder to understand. The resources are automatically decompressed and decrypted at runtime, when each resource is first needed.
Note that this option has no effect on embedded dependencies: you can compress and encrypt embedded dependencies using the options on the Dependencies Embedding feature settings pane (this is because you may need to disable encryption for some of your embedded dependencies). See Embedding dependencies for more information.
Using resources compression and encryption
To compress and encrypt resources, in the Project Settings window, go to Resources Compression and Encryption or click the icon in the toolbar.
Select the resources to compress and encrypt.
When resources compression and encryption is enabled, the colored bars under the toolbar icon and to the left of the feature options are green. If it is disabled, the bars are orange.
You can't use resources compression and encryption in the following scenarios:
- If you want to use
GetManifestResourceNames
. - With assemblies using any version of Silverlight, Windows Phone 7.x XNA, Xbox XNA, or Windows Phone 7.x.
- With SQL CLR assemblies.