ILOG Rules for .NET User Guides > Rule Studio > Executing Rules > Loading the Rule Engine Assemblies

The ILOG Rule Engine for .NET uses the regular referencing mechanism to resolve types at runtime. Sometimes, however, the rule engine cannot find a type. For example, this can happen when a business object model uses a type that is implicitly referenced. In this case the rule engine looks in the search path of the application. That is, it looks in the directory containing the application and then the subdirectories of that directory.

Sometimes the assembly containing the type is not in the application search path (in the GAC, for example). When this happens you need to explicitly load the assembly. How you do this depends on the execution environment you are using.

To explicitly load an assembly in WinForms, ASP.NET, and Web Service applications
  1. Add the following to your application code to load the assembly containing MyType:

[C#]

System.Reflection.Assembly asm = typeof(MyType).Assembly;
 

[Visual Basic]

Dim asm As System.Reflection.Assembly GetType(MyType).Assembly
 

See Also

Creating an Engine and Executing a Ruleset | Retrieving Data and Events From the Engine