1

I have a very big problem with Prism 7.1.0.431.

I want to register type in unity container with interceptors like this

container.RegisterType(new Interceptor<TransparentProxyInterceptor>(), new InterceptionBehavior<MyBehavior>());

but its impossible. containerRegistry does not have method to register with interceptors.

in the other side when i trying to make

containerRegistry.GetContainer()

and call registerType directly on UnityContainer instance, it fails on RegisterType method

The type 'InjectionMember' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Abstractions,

Haukinger
  • 10,420
  • 2
  • 15
  • 28
  • Can you provide some more context around this? I might also suggest that you file an issue with Unity. Prism references the Unity.Container as the Top Level dependency which ultimately references Unity.Abstractions. The moment you call the GetContainer, you are working directly against the underlying container, in this case Unity. – Dan Siegel Mar 03 '19 at 22:12
  • i want to use injectors from unity, but prism referencing unity.abstractions 3.3.1 which dont support this i think.. – Dominik Miedziński Mar 10 '19 at 15:52
  • You really need to reach out to the Unity maintainer as he’s made some recent breaking changes that won’t let Prism update to the latest version. – Dan Siegel Mar 10 '19 at 17:41

1 Answers1

0

The type 'InjectionMember' is defined in an assembly that is not referenced. You must add a reference to assembly 'Unity.Abstractions,

You should actually add a reference to Unity.Abstractions to your project.

Haukinger
  • 10,420
  • 2
  • 15
  • 28