Does it tell you what type it is failing to load?
- If you turn on the Self Diagnosis feature (on the Build Succeeded page of the SmartAssembly UI) or, if you are testing on a different machine to the one with SmartAssembly on, turn on the Automated Error Reporting.
- When the error occurs you will then get an error report which will tell you the unobfuscated name of the type which is causing issues.
Is the type defined in the main assembly and then used by the plugin?
How is the type being created/used in the plugin?
The mostly likely cause is that the type is mistakenly being obfuscated or pruned (this can occur if the type is defined in an exe or is only being called by reflection).
If you open up the SmartAssembly project for the assembly that contains the type.
If you are applying pruning to your assembly, then under the Pruning section next to the name of the assembly there will be an \"Exclusions...\" link. If you click on this link and then navigate through the namespace to find the type
If the type is described as being a \"Fully useful class\" or is only listing a few members or attributes to prune then that is good and SmartAssembly has correctly identified it as being used. If it is described as a \"Prunable Class\" click the \"Exclude from Pruning\" button in the middle of the page. This will tell SmartAssembly not to prune the type.
If you are applying obfuscation to your assembly, then under the Obfuscation section next to the name of the assembly there will be an \"Exclusions...\" link. If you follow the same procedure as I described for the pruning to make sure that it is not obfuscating the name of the typel.