Thanks in advance for your help...
I am struggling with Unity 3.0 trying to get types and interception registered correctly. The problem begins with Unity not liking the app.config file. Here is a snippet from a test program:
catch (Exception ex)
Console.Write("Exception:"); // just so we can break and examine the exception
// This should not be necessary in Code!
"interceptedName" is equal to "TestAndDebugLoggingInterceptor." It throws an InvalidOperationException:
The type name or alias
could not be resolved. Please check your configuration file and verify this type name.
The call to container.RegisterType proceeds without an exception. However, when I trace through the code, the interceptor (TestAndDebugLoggingInterceptor) is registered twice, and it indeed calls it twice before calling the target method(s) in TestClass. At
first, I thought that perhaps the registration from the app.config file was succeeding despite the exception. But, commenting out the call to container.RegisterType results in an exception that the type cannot be resolved.
I can post the app.config file if anyone wants to see it, but I am guessing at this point that it is not relevant, because of the exception being thrown. Aside from whatever syntax or path error there is in the app.config file, does anyone have any idea why
RegisterType ends up wrapping the targets twice? The syntax for that call is straight out of MSDN examples, so I am somewhat stumped at this point.