Unity - Prism IoC problem

first post: kermitfrosch wrote: Hallo, i am trying to modular applications with prism & unity. i ...

latest post: randylevy wrote: The root problem is that there is a MissingMethodException: "No par...

ResolutionFailedException: The current type is an interface and cannot be constructed.

first post: Mythreyi wrote: Hi, I have started using Unity only over the past week. Please help...

latest post: bankeysharma wrote: I had similar issue which solved after adding an alias to concrete ...

Resolve type in microsoft unity in a web application in global.asax

first post: simone86 wrote: i am trying to resolve some classes in my web application following...

latest post: simone86 wrote: Great thank you, even if I am a little bewildered about performance...

VNext support

first post: NiclasPehrsson wrote: When will support for VNext show up? https://github.com/aspnet/Dep...

Can´t install the Unity Package from the Package Manager Console

first post: rafaelsoteldo wrote: I'm trying to install the Unity Package from the Package Manager Co...

latest post: rafaelsoteldo wrote: The new version is more specific when displaying error details. Th...

answered by: randylevy wrote: That's very strange. With NuGet 2.8.50313.46 and Visual Studio 201...

How to delay(lazy creation) or suppress creation of Call Handler objects until the method is actually called

first post: sucharith wrote: I am trying to use Interception Call Handler and Handler Attributes...

latest post: sucharith wrote: Assuming I chose to go down the "rabbit hole", can you point me in ...

issue with Class<T> : Interface <T>

first post: trolane wrote: this worked fine in 3.0 but is saying it's not registered in 3.5 ev...

latest post: randylevy wrote: I don't see any changes to the source code and the IL I'm looking a...

Registering instance of COM Object

first post: olgierd15 wrote: Not sure whether this is an issue or i'm just using it wrong. I'm t...

latest post: randylevy wrote: The change between 3.0 and 3.5 in Guard.InstanceIsAssignable was fr...

Mef OnImportsSatisfied() Equivalent in Unity?...

first post: VcDeveloper wrote: Hi, OS: Window 8.1 Development: WinRT, WinPhone Is there Mef OnIm...

latest post: VcDeveloper wrote: Ok thanks!... Appreciation your reply!... :)

Unity 3.5 PCL Preview - your feedback is invited!

first post: gmelnik wrote: Greetings! We have shipped a preview of Unity 3.5 nuget packages v...

latest post: randylevy wrote: In Unity directly you would just register your dependencies using R...

Offficial release?

first post: nosql wrote: Unity has been in pre-release for more than 3 months. When will it...

latest post: gmelnik wrote: https://twitter.com/bennage/status/501888358503563264

I can't use Interception to my Application

first post: TimLiao wrote: Hi I try to use Unity's Interception I set DI container in my co...

latest post: randylevy wrote: In the first scenario you are registering a default (unnamed) type ...

Instantiating multiple instances of a container from xml

first post: mfenske17363 wrote: Very new to Unity and IoC in general so after a bit of a crash cour...

latest post: randylevy wrote: Yes, you can configure Unity (using XML) with various concrete impl...

Unity Object Constructor Question

first post: Russty wrote: Hi, I'm just beginning to understand how to use Unity, but I'm no...

latest post: Russty wrote: Randy thanks so much for this! It worked perfectly and clarified...

How does RegisterInstance works?

first post: bharath87 wrote: Hi, I am creating an object of the interface through registerinstan...

latest post: bharath87 wrote: Hi Andy, Yeah I am looking for a IConnectionRepository object crea...

ASP.NET Web API - Inject Dependencies Into ActionFilterAttribute

first post: Sohnee wrote: I have Unity running great for all the controllers in my ASP.NET We...

latest post: randylevy wrote: You have a keen eye -- that line is not needed. It must be an artif...

Unity and Random “Index was outside the bounds of the array” exception

first post: mehmetim wrote: We are running web site with around 15.000 realtime user (google an...

latest post: dot_NET_Junkie wrote: Yep, injecting dependencies into attributes is another anti-pattern...

Property Injection in MVC CustomFilters though unity

first post: bharath87 wrote: Hi, I am trying to create a similar scenario as below: public cla...

latest post: bharath87 wrote: Hi Randy, Thank you so much . Your suggestion made me know what i ...

PreRequestLifetimeManager

first post: vincent_wu01 wrote: Hi Everyone, Currently, we have a project using unity as IoC tool...

Unity 3.5 with ValidationAttribute

first post: pinger wrote: So.. I am grasping at straws here. I am not even sure this is possi...

latest post: pinger wrote: You are 100% correct. I was already working something in this direc...

Cant resolve Constructor Injection with multiple Concrete types on same interface

first post: andyg8180 wrote: If i register a single interface against two different concrete obj...

latest post: andyg8180 wrote: thank you randy! I will give that a whirl. I appreciate the quick r...

How could I pass data to child method's interceptor from parent method

first post: berniegao wrote: Let's say I have two methods as below - Parent and Child. When logg...

latest post: berniegao wrote: thanks Randy, I will check CorrelationManager out.

Turn on / off Interception [InterceptionBehavior]

first post: sathishoncodeplex wrote: Hi , We are trying to implement logging using interception . We nee...

latest post: randylevy wrote: Unity caches the build plan so even though you "reset" the registra...

Problem with Registration By Convention and Interface Interception

first post: fourpastmidnight wrote: I'm having a problem getting interface interceptors to, well, inter...

latest post: randylevy wrote: Thanks for posting an update! ~~ Randy Levy [entlib.support@live.c...

answered by: fourpastmidnight wrote: What I have written here works as advertised. I actually had a prob...

Why no private properties injection yet?

first post: armsoft wrote: I'm working with Unity for many years but even at this days it stil...

latest post: fourpastmidnight wrote: You may be right about that @dot_NET_Junkie ;) Unfortunately, I do ...

Unity 3.5 changed InstanceIsAssignable leads to problems

first post: Hlodvig wrote: Hi all, In our MVC project we used some cashing of requests to ex...

latest post: randylevy wrote: I'm not sure I follow 100% where and how you are using interception...

Using common unity configurations for mutiple projects

first post: amrmahdi wrote: Hi, I've got multiple projects that share most of the unity configu...

latest post: randylevy wrote: You can use the configSource attribute to point to a common unity c...

answered by: randylevy wrote: You can use the configSource attribute to point to a common unity c...

Registration by Convention in Unity 3.5 Portable Class Library Preview

first post: akhaider wrote: I have been previously using Unity 3.0, It has RegisterTypes functi...

latest post: randylevy wrote: You should use the [Unity 3.5.1405-prerelease](http://www.nuget.org...

answered by: randylevy wrote: You should use the [Unity 3.5.1405-prerelease](http://www.nuget.org...

Resolution Failed when calling Constructor

first post: jazzyhacker wrote: Currently, I'm having problem in using injected properties in the c...

latest post: randylevy wrote: From what I've seen most people (but not all) recommend using const...

answered by: randylevy wrote: From what I've seen most people (but not all) recommend using const...

Unity config xml injection constructor pass parameter of type Func<Guid>

first post: KenCowley wrote: I need to pass a value from the membership provider namely (Guid...

latest post: KenCowley wrote: ended up with this code which seems to do what I want ``` public s...

Web.config and dll with Unity DI

first post: bednarz wrote: Hi, I would ask about one thing... I have some web App MVC. I ad...

latest post: randylevy wrote: The controllerType is passed in by ASP.NET MVC to the Controllerfac...

PerThreadLifetimeManager Dispose of registrations

first post: luizfbicalho wrote: I have a windows service that reads a queue and for each item in th...

latest post: mmckechney wrote: Yes it is a windows service, but I see the difference now. I create...

Unity 3.5 Silverlight support

first post: darkman666 wrote: I want to discuss my attempt to add Silverlight 5 support to last U...

Unity upgrade from 3.0 to 3.5 throwing a "System.Runtime is not referenced"

first post: RicardoGuerra wrote: Hi there, We've migrated Unity from 3.0.1304.1 to 3.5.1404.0 via ...

latest post: luizfbicalho wrote: I reproduced this problem in another project, and I would like to g...

InvalidOperationException - The type ObservableCollection`1 has multiple constructors of length 1. Unable to disambiguate.

first post: SSG31415926 wrote: I'm currently getting 'InvalidOperationException - The type Observa...

latest post: SSG31415926 wrote: Thanks very much for solving that for me.

What is Proper way to inject caller username on the server side of IIS hosted web service

first post: matra wrote: Hi, I have troubles injectiong the authenticated user credentials...

latest post: matra wrote: Randy, Thanks for the answer. 1. I can not use dependency overri...

answered by: matra wrote: Randy, Thanks for the answer. 1. I can not use dependency overri...

Blog Roll?

first post: MichaelDBang wrote: Hello, I am curious on what the best blogs for EntLib for, so th...

latest post: bennage wrote: Hi Michael, For the short term, official news will be both [twitte...

How to provide optional parameters

first post: GOre01 wrote: Hi! I have a container cofigured to use with the MVC5 project. And...

latest post: randylevy wrote: From what I am seeing it looks like Unity interception does not pla...

Using xml config to register an interface with nested generics.

first post: bryant wrote: I posted this at Stack Overflow here: http://stackoverflow.com/qu...

latest post: randylevy wrote: The posted answer on Stack Overflow is good. Use the aliases in th...

Event After Registration

first post: luizfbicalho wrote: Is there a way to register an extension to execute an event after a...

latest post: randylevy wrote: Yes, that is the behavior I would expect. What you are seeing is w...

Why two Microsoft.Practices.Unity.dll libraries in Nuget package?

first post: jack123 wrote: Hi there, In the Prism.UnityExtensions nuget package, there is th...

latest post: jack123 wrote: Hi Manikrish, I'm not having any issues with it's use; my question...

Problems loading assemblies using UnityContainer.RegisterTypes. My app is running on IIS7

first post: foxhard wrote: Hi I have a problem trying to load assemblies with necesary classe...

latest post: foxhard wrote: I have solved the problem. :) The way "AllClasses.FromLoadedAssemb...

answered by: foxhard wrote: I have solved the problem. :) The way "AllClasses.FromLoadedAssemb...

Add values to System.Collections.Generic.List in config

first post: kiwikencox wrote: Hi All, Am using Ent.Lib 6 LogCallHandler for policy injection an...

latest post: kiwikencox wrote: Yussss! Spent a few hours looking into this. Thanks heaps for you...

answered by: randylevy wrote: You are on the right track. Instead of using the capacity construc...

Auto Mapping of Interfaces to Classes

first post: rjperes wrote: Hi, I have an assembly with types ILogger, FileLogger and ConsoleL...

latest post: rjperes wrote: Randy, Yes, of course, you are right. Thanks for the info. RP

NuGet package for Universal Apps

first post: Engicoder wrote: Is there a timeframe for updates to provide a NuGet package that ca...

latest post: randylevy wrote: Thanks for the feedback. As you discovered it's on the issue list,...

Unity MVC5

first post: memnto wrote: Hi guys, I not sure if this is good place to ask this question or ...

latest post: memnto wrote: Thanks guys, and sorry for late reply. thanks to @randylevy, I man...

How do I replace a factory class by the Unity container?

first post: Tetsushmz wrote: Hi, I have a question on how to inject a dependency that depends ...

latest post: Tetsushmz wrote: Hi Randy, Thanks for your code. Your use of Func intrigued me and ...

UnityFilterAttributeFilterProvider Not Working

first post: nfplee wrote: Hi, I've installed the Unity.Mvc NuGet package but I can't seem to ...

latest post: nfplee wrote: Thanks, I think I'll leave it as is for now until I find some more ...

answered by: randylevy wrote: If you are going to register a singleton instance as a global filte...

Unity Registration Performance Issues

first post: ask_jay wrote: Background: We have a large legacy application, several million LOC...

Cannot register types whose assemblies are not previously loaded. Is this intended behavior?

first post: julealgon wrote: I'm trying to 'convert' a plug-in system of sorts to use the unity ...

latest post: randylevy wrote: Sample should still be on OneDrive @ http://sdrv.ms/ZoGGeU : UnityP...

Interception callHandler does not work

first post: simone86 wrote: Im trying to use Interception with Microsoft Unity. Somenthing does...

latest post: simone86 wrote: Ohh... that's perfect... now it works... thank you!

answered by: randylevy wrote: CustomAttributeMatchingRule applies to the member and not to the cl...

Registration of IWhatever<T> -> Implementation where Whatever<T> base class exists

first post: michaeldtaylor wrote: Hi, I'm just some existing container code to use Unity 3 conventi...

latest post: randylevy wrote: So you want to use Unity 3 registration by convention to map an IDa...

Prevent Class Instantiation directly

first post: VanOfBees wrote: I am using Unity for class resolution on a large project. We are u...

latest post: randylevy wrote: I think that a custom code analysis (or FXCOP) rule could cause com...

[Resolved] - User error

first post: smarts wrote: I have a UnityContainer instance that I populate from configuration...

latest post: smarts wrote: Thanks for the feedback. In creating a sample project I was not abl...

unity breaks sporadically saying "does not have an accessible constructor"

first post: giddy wrote: This is a continuation of this thread. It's been nearly a year and ...

latest post: randylevy wrote: Thanks for posting a detailed question. It looks like you are hitt...

Why is the use PerRequestLifetimeManager discouraged in the docs?

first post: cb55555 wrote: According to the docs: Although the PerRequestLifetimeManager life...

latest post: randylevy wrote: @cb55555, this is just a caution that it should only be used where ...

The type InjectionPolicy does not have an accessible constructor

first post: giddy wrote: So, We have a large application (many, many tiers) and they all us...

latest post: giddy wrote: Guys! We still are suffering with this issue, I've posted a pretty ...

Passing an array into a constructor of ResolvedArrayParameter

first post: bckpwrld wrote: Hi From: class MyClass { public MyClass(ILogger[] myLogger) {} } ...

latest post: randylevy wrote: > Using the RegisterInstance method to register an existing object ...

How to automatically inject all named instances into a generic array?

first post: bckpwrld wrote: Hi public class Account { } public class MyClass<T> { public T...

latest post: bckpwrld wrote: I completely forgot that Unity calls a constructor with most parame...

Unconstrained ParameterOverride don't seem to be behaving as described in documentation

first post: bckpwrld wrote: hi From : Since the purpose of overrides is to affect the resolut...

latest post: bckpwrld wrote: much thanks for clarifying it

UnityContainer.IsRegistered() : Value cannot be null.

first post: adense wrote: I use unity 2.0.414.0 (.Net 3.5)。 Sometimes to get an exception me...

latest post: randylevy wrote: The issue that you are seeing is that you are running in a multi-th...

Access attribute inside interceptor

first post: gusgorman wrote: Hello, I am using an attribute to mark where interception should t...

latest post: gusgorman wrote: Again, thanks for the reply, much appreciated. I have gone with the...

Avoiding SetInterceptorFor with Unity 3

first post: gusgorman wrote: Hi, I have developed a TransactionInterceptor and a TransactionAt...

latest post: gusgorman wrote: Ok cool, thanks for all the different suggestions. I've mainly used...

Unity 3: Passing parameters to policy injection custom call handlers through a configuration file

first post: jasonjlee wrote: Hi, I'm writing a custom call handler and I'm having trouble trying...

latest post: randylevy wrote: One way would be to attribute the default constructor with an Injec...

Using Unity in framework like code.

first post: DavidDWill wrote: I am starting work on a new framework type of code, i.e. a set of c...

latest post: randylevy wrote: Will consumers of your framework know that you support dependency i...

Unity 3: auto registering multiple implementations for one interface

first post: Nobadeer wrote: I have an interface IFoo<T> Multiple concrete classes implement IF...

latest post: mieliespoor wrote: Awesomeness! Thanks

answered by: randylevy wrote: Sorry about that...don't know what I was thinking. Ignore the exce...

Injecting container into View Models to resolve Enterprise Library's logger? Seems like the wrong approach

first post: SapphireGirl wrote: Hi, I have a WPF app that I am building that uses prism with a u...

latest post: randylevy wrote: I don't think you should have to "new up" any objects; the containe...

Unity Custom Serialization

first post: kamalt wrote: I am using Unity with WCF client (ASP.NET Web API). Once the channe...

latest post: DustinHorne wrote: [https://www.assetstore.unity3d.com/#/content/11347](https://www.as...

Size of a container

first post: gravy wrote: Hi, I'm just starting to use Unity in a large enterprise applicat...

latest post: randylevy wrote: I can't really answer definitively since every application is diffe...

Unity 3.0 for .Net 4.0?

first post: jlongino wrote: We would like to make use of the latest 3.0 release but are unfortu...

latest post: MatthiasG wrote: Hello jlongino, does your fake of the TypeInfo worked? Can you mak...

Appending InjectionMembers AFTER RegisterType has happened

first post: evanization wrote: Hi, I am using Unity 3.0 I have this code: UnityConfig.Conta...

latest post: randylevy wrote: You can re-register the types after the initial registration to add...

Small Application vs Large Application

first post: rafaelsoteldo wrote: Hi there: I'm trying to decide whether the application I'm about t...

latest post: rafaelsoteldo wrote: Thank you

answered by: weberse wrote: If you use Prism with Unity, you have the container "just lying aro...

Unity Policy Injection for all classes

first post: dreadjr23 wrote: <container> <extension type="Interception"/> <register...

latest post: randylevy wrote: There is no out of the box way to "globally" apply interception and...

Unity not detecting automatically webapi controllers

first post: CSADNT wrote: Running in an Azure Worker Role and and OWin hosted WebApi using We...

latest post: CSADNT wrote: Ok thanks

Unity Serialization Support for Serializable Proxies

first post: zhoel wrote: first approach here! http://blog.odra.com.ar/2011/06/unity-serial...

latest post: zhoel wrote: if you do not want your proxy to pass through the domain, you shoul...

Resolving some parameters of an object using factory

first post: ruskindantra wrote: Hi All, I am trying to resolve an object using some automatic cons...

latest post: randylevy wrote: If you are using a composition root then all IDatabaseConnector cla...

Re-register a singleton during deserialization

first post: jlongino wrote: I have searched and do not see any discussion which quite hits this...

latest post: randylevy wrote: You will have to manually re-register the classes. You shouldn't h...

Difference between Unity 2 and 3

first post: jeansfish wrote: In my project, i use Unity 2 before, but after i upgraded to Unity ...

latest post: jeansfish wrote: Randy, thanks very much. Depend on your instruction, I add a prope...

Unity using DI config with ASP.NET N-tier solution.

first post: darnold924 wrote: My problem is that the Web.config contains the DI mapping. So all t...

latest post: randylevy wrote: I think [this answer and diagram by Mark Seeman ](http://stackover...

WCF service not interceptable using Unity 2.0 Interception

first post: surajnaik82 wrote: In my WCF web application I have configured the Unity container for...

latest post: im_wower wrote: thanks for sharing~a good approach~

DIwithUnitySample for windows 8.1 will not run exe

first post: warrenla wrote: I have tried to download and run (unblocked) the DIwithUnitySample ...

latest post: randylevy wrote: The file is just a self extracting exe. I tried on my Windows 8.1 ...

UnityContainer ThreadSafe ?

first post: nif_lens wrote: i tried fllowing code : using System; using System.Collections.Ge...

latest post: nif_lens wrote: i chang to create a Child Container per thread ,it work fine! th...

Unity is now open for community contributions!

first post: bennage wrote: Unity is now open for community contributions! To learn more abo...

How to inject application_start(MVC)

first post: mhabibal wrote: hallo , I am a beginner in dependency Injection and unity ,and I w...

latest post: dot_NET_Junkie wrote: There's no way to automatically inject those dependencies into the ...

ResolvedArrayParameter not injecting array of dependenceis

first post: BenCrinion wrote: Hi I've got the following constructor on one of my classes.. public...

latest post: randylevy wrote: Sorry didn't notice the use of ResolvedArrayParameter. ResolvedArr...

answered by: BenCrinion wrote: Alright your answer combined with using ResolvedParameter instead o...

Policy Injection lifetime & Best Practices questions

first post: calexandre wrote: Hey all, I have been using Unity for almost 2-3 years now and i nev...

latest post: randylevy wrote: Sorry about that answer -- I guess I misunderstood what you wanted ...

answered by: randylevy wrote: Sorry about that answer -- I guess I misunderstood what you wanted ...

ECCN Number?

first post: dev21 wrote: Does this project have a US Export Control Classification Number (E...

latest post: gmelnik wrote: Since the Unity source code does not include cryptography, and is f...

Unity DI container performance with increased Type registrations

first post: Pushkar_Open wrote: How Unity DI container perform with increased Type registrations? L...

Open Generics Registration Bug

first post: julealgon wrote: Yesterday, we just found what seems to be a problem with the implem...

latest post: randylevy wrote: Thanks for the kind words, Juliano. > Isn't there a way to overr...

Using Named registrations without Service Locator

first post: develop16 wrote: I've been using Unity for a while now, but it occurs to me I've bee...

latest post: randylevy wrote: @develop16 there are a lot of options available to you in this case...

Register Type to Handle Case When HttpContext.Current Doesn't Exist

first post: nfplee wrote: Hi, I have an ASP.NET MVC application and in my Application_Start e...

latest post: nfplee wrote: Yeah i'm using Unity 3. Thanks I wasn't aware this had been bundled...

answered by: nfplee wrote: Yeah i'm using Unity 3. Thanks I wasn't aware this had been bundled...

Resolve a new Instance

first post: manullino wrote: Hi, I registered a interface and a business class. Every time the ...

latest post: randylevy wrote: I'm guessing that whatever you are seeing is related to how Prism u...

Configuration by convention for MVC

first post: hcathey wrote: I have been reading the reference docs and found that run-time conf...

latest post: hcathey wrote: Great thanks. I guess I was confused. I was looking at the Unity 3 ...

Unity.Interception

first post: rinojohnsen wrote: Hi, what is the reason for Unity.Interception not working on WinRT?...

MVC 5

first post: tsinghammer wrote: Hi there, I tried to upgrade my web app over the weekend upgradin...

latest post: tsinghammer wrote: Hi, thank you Randy, Yes, you may be right. I installed it via the...

Downloaded latest unity3 book but where are the examples code

first post: brix wrote: Hi, I have the latest unity3 book but cannot find the code that go...

latest post: randylevy wrote: **brix wrote:** > Found them! # Great...if anyone else is looking f...

answered by: brix wrote: Found them!

Unity 2.0 and LogCallHandler

first post: jbx wrote: I am having issues getting my methods intercepted and at the same t...

latest post: jbx wrote: Thanks a lot. That works.

answered by: randylevy wrote: Here is the config that works for me: <?xml version="1.0" encodin...

F12 -> Jump to method

first post: realityfusion wrote: Os there any way to set it up so that f12 see if the interface you ...

latest post: randylevy wrote: You might be able to create a Visual Studio Extension to do somethi...

Ent Lib 6 / Unity 3: Injecting a dependency into a CustomTraceListener

first post: scfox wrote: CONTEXT: I am using Enterprise Library 6 and Unity 3 throughout m...

latest post: randylevy wrote: One of the goals of Enterprise Library 6 was to simplify; one of th...

answered by: randylevy wrote: One of the goals of Enterprise Library 6 was to simplify; one of th...

Is there any docs, examples for NetCore (Windows Store apps).

first post: damienbod wrote: Thanks Damien

latest post: randylevy wrote: Damien, thanks for sharing with the community! ~~ Randy Levy [entl...