SmartAssembly - 6.0

SmartAssembly

Learning SmartAssembly - 6.0

Searching for dependencies

To locate and load a dependency, SmartAssembly searches for the dependency in the following locations, in this order:

  1. The GAC (Global Assembly Cache). The dependency must have an assembly name which includes the same version number and public key token.
  2. The framework folder and associated folders (for SDKs, Silverlight, XNA, etc.).
  3. The main assembly folder for a dependency with a similar assembly name (even if the version and/or public key token are different).

If your dependency is not found, or if the wrong version of it is found, you can override the normal behavior by manually editing the SmartAssembly project file (*.saproj) in an XML editor. To do this, add the MandatoryPath attribute to the <Assembly> tag, as in the example below:

<Assembly AssemblyName="dependency_assembly_name" MandatoryPath="C:\path\DependencyToUse.dll">... </Assembly>

SmartAssembly will always use the dependency found at this location.

Note: If the dependency is not valid (for example, the file is not found, or the assembly has a different assembly name), SmartAssembly does not process your assembly and reports an error.

Was this article helpful?

Search support
Forums
Visit the SmartAssembly forum.

SmartAssembly

all products