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: michaeldtaylor wrote: Anything? Is this a clear enough example? Also, how would I resolve...

Interception callHandler does not work

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

latest post: simone86 wrote: Hi Randy.... Thanx!! Really.... Finally it works... Now I understan...

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...

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: charlekl wrote: Hi Randy, Can you please re upload the sample? I'm trying to do...

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...

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: randylevy wrote: I don't have a specific example but you can find the approach in th...

Unity MVC5

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

latest post: luizfbicalho wrote: Another way to get all of thls in the bin folder is using this lin...

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...

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: armsoft wrote: @dotNETjunkie: Good try but missed. I'll decide by myself what is g...

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...

Register DbContext using Unity

first post: xcap2000 wrote: Hi, I am having problems with unity 3.0 and DbContext from Entity...

latest post: xcap2000 wrote: Randy, Thank you for helping, I will send you an e-mail with a wor...

Beginner Question - IEnumerable<T>

first post: jgd12345 wrote: Hi, I use the following to register a type: container.RegisterType<...

latest post: smarts wrote: Thanks, that makes sense. I tend to overload constructors that take...

Named registration injection based on property name

first post: rondegroot wrote: Hello, I have a question/suggestion. Is there a possibility to in...

latest post: rondegroot wrote: It looks like this post is exactly what I need. Thanks for referring!

Roadmap for Windows Phone?

first post: Billkrat wrote: I understand Prism will be retrofitted for C#/Silverlight 4.0 which...

latest post: gmelnik wrote: __Aug 2013 Update:__ We have released a version of Unity for Windo...

Will Unity support Windows Phone 8.0?

first post: englishguy64 wrote: Will Unity support Windows Phone 8.0?

latest post: gmelnik wrote: Aug 2013 Update We have released a version of Unity for Windows Ph...

couldn't install in WP8.0 project

first post: Allen_Li wrote: Why it couldn't install in WP8.0 project?

latest post: gmelnik wrote: We have released Unity for Windows Phone 8. http://blogs.msdn.com/b...

Unity Decorator Extension fails with multiple implementations

first post: julealgon wrote: As always, I've created this same question o SO already, will be co...

latest post: julealgon wrote: I'm sorry for not coming back to you earlier, thanks a lot for the ...

New book: Dependency Injection with Unity

first post: gmelnik wrote: We've published the final version of the Dependency Injection wit...

Error when using config file for Interception in Unity.

first post: Wooootc wrote: Hi guys, I am a starter for Unity Framework, and currently I'm work...

latest post: Wooootc wrote: ohh, yes, that is the problem. Thank you sooooo much.

Complex type converter that need to resolve objects

first post: ddrj wrote: Hi, I've written a type converter for Unity 2.1 to be able to ins...

latest post: randylevy wrote: You can access the Unity configuration using the `UnityConfiguratio...

Request for configurable default lifetimemanager

first post: JochenZ wrote: Hello! Currently, Unity has the TransientLifetimeManager as the de...

latest post: sephirothnova wrote: I think i have a solution to this issue, I have not had a chance to...

One interface multiple implementaion issue

first post: abhisheks wrote: Just started with Unity today. Page 37 in Developer's guide to Mic...

latest post: randylevy wrote: @abhisheks, Page 48 of the Guide discusses named registrations with...

How to get the container in MVC e.g. RoleProvider

first post: AndiRudi wrote: Hi, im using Unity in an MVC Application to Inject my Repositories....

latest post: randylevy wrote: To state the problem in general: the scenario is classes that integ...

ContainerControledLifetimeManager -> not singleton?

first post: RainerQ wrote: Hi, I have a little problem on understanding, how to resolve a In...

latest post: RainerQ wrote: Hello Randy, thank you very much for your help! > You will need ...

StackOverflowException if base method called.

first post: Danielku15 wrote: Hello everybody. My plan is to call the RaisePropertyChanged meth...

latest post: Danielku15 wrote: I finally found the bug. It has nothing to do with unity. My code w...

Developer’s Guide to Microsoft Unity.pdf - DIwithUnitySample

first post: patrickd wrote: Hi, Where can I find the DIwithUnitySample project referenced in ...

latest post: randylevy wrote: If you download [Unity3-devguidesamples-source.exe](http://unity.co...

DependencyAttribute and virtual properties

first post: Almas wrote: Hi, guys, I'd like to override the dependency resolution of injec...

latest post: randylevy wrote: If you want the highest level of maintanability then constructor in...

Registration convention generates two registrations for each mapping

first post: luizfbicalho wrote: I created some registration conventions and in the GetFromTypes() m...

latest post: randylevy wrote: The worst case scenario is that you can modify the Unity source cod...

Just some ideas

first post: marcoerni wrote: HiI' am just starting to prepare the migration of some mid- to larg...

latest post: PhilMurray wrote: Thanks ThunderEagle. I figured that one out.

Unity.MVC Nuget Package - VB.NET Version?

first post: GoldenHornet wrote: Is there a VB version of the Unity bootstrapper for ASP.NET MVC pac...

latest post: randylevy wrote: I don't believe there are formal VB.NET versions. There's not much...

Unity Error: An abstract InjectionMemberElement object cannot be created

first post: chrisUD wrote: Hi all, I have recently inherited an ASP.Net project where Unity is...

latest post: besicdenis wrote: **viratsarswat wrote:** > I was facing the same issue and after hou...

Injecting Constructors with CustomAttributeMatchingRule

first post: PlaySharp wrote: Trying to make CustomAttributeMatchingRule for Policy injection wor...

latest post: randylevy wrote: Not sure what your full code looks like but something like this sho...

Unity Interceptions - AOP and Attributes

first post: PlaySharp wrote: I'm experimenting on making an AOP-Based library, here is what I ha...

latest post: PlaySharp wrote: Thanks for the info.

how to use both custom handler and ValidationCallHandler in the same method by unity 2.0 container?

first post: hackace wrote: For example,I want to use customCallHandler and ValidationCallHand...

latest post: robbratton wrote: Thank you for the example. It really helped me understand how to us...

Multiple Injection Constructors

first post: coachshea wrote: I sometimes run into a situation which requires me to write several...

latest post: coachshea wrote: Thank you very much for your quick and thorough answer. I did mean...

answered by: randylevy wrote: The code, as posted will not compile since the `Resolve` method doe...

Performance with loaded containers

first post: philipmateescu wrote: I've recently conducted a test of performance of various .Net DI co...

latest post: lsalotto wrote: Yeah.. that's what I thought and ended up doing. The code is work...

IInterceptionBehavior GetRequiredInterfaces purpose

first post: robertpetz wrote: Can anyone tell me what the purpose is for the GetRequiredInterface...

latest post: randylevy wrote: In practices most behaviors seem to be general purpose so do not sp...

InterfaceInterceptor with Registration by Conventation

first post: damienbod wrote: I use registration by Convention to create all objects using unity ...

latest post: damienbod wrote: Thanks a million, that worked.

Unity Cannot find Constructor of partial class!

first post: neil_hosey wrote: Hi there, I have a problem whereby I have a WCF service reference a...

latest post: randylevy wrote: Try passing the values that you want directly: ``` c# container.Re...

Unit testing interceptors configuration

first post: habi2al wrote: Hi! I'm going to make unit test to check unity configuration xml f...

latest post: randylevy wrote: Yes, you can retrieve configuration information programmatically. ...

Resolving interface dependency in Unity 3.0

first post: Netrider6 wrote: I'm trying to get dependency injection working on a MVC 4 web appli...

latest post: Netrider6 wrote: Nevermind, it worked when I used the UnityConfig.RegisterTypes() ca...

Unity 3.0 registration troubles

first post: PeterHowe wrote: Thanks in advance for your help... I am struggling with Unity 3.0...

latest post: PeterHowe wrote: Thanks, Randy, that was it. Actually, the TestAndDebugLoggingInter...

Unit3 LoadConfiguration() deprecated?

first post: Netrider6 wrote: I am new to Unity (version 3.0.1304.0) and am trying to set up my f...

latest post: homelchenko wrote: You're welcome, and tools like Resharper and others would have help...

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: Sorry, my post was about ASP.NET MVC and *not* ASP.NET Web API. Oo...

Symbols with Source Code for latest Unity release

first post: abatishchev wrote: Were the debug symbols containing source code published anywhere? F...

latest post: abatishchev wrote: I'd like to debug NuGet package dlls without local build of any kin...

DIWithUnity Sample code where is it?

first post: brix wrote: Hi all, Download the Unity Guidance and it mentions some sample co...

latest post: oscarlagatta wrote: Thanks randylevy, I installed the package Unity.Mvc3 and works fin...

DependencyResolver.SetResolver(new UnityDependencyResolver(container));

first post: oscarlagatta wrote: Hello, I've installed Unity runtime v4.0.30319, for the first t...

latest post: randylevy wrote: If you are targeting .NET 4.0.30319 then you are probably using Uni...

Problem installing unity with Nuget (not compatible with any project in the solution)

first post: papadi wrote: Hi! I have a VS 2012 solution with .net 4.0 project. I'm trying to...

latest post: randylevy wrote: The recently released Unity 3 requires .NET 4.5 while Unity 2.1 req...

MappedTo.matchinginterface missing

first post: vallekie wrote: Hi all, i'm probably looking in the wrong place, but i can't seem...

latest post: randylevy wrote: I think that the final implementation has changed slightly. This s...

How do I passthrough the name arguement to child dependancies

first post: legaldeveloper wrote: Hi, I've been trying to work this out but come to a point where I...

latest post: weberse wrote: Maybe [this article](http://outlawtrail.wordpress.com/2012/08/01/re...

Ent Lib 6 Config Console Unity support

first post: praneethw wrote: Hi, I just installed the Microsoft.Practices.EnterpriseLibrary.Con...

latest post: randylevy wrote: It looks like this story was not implemented. See http://entlib.us...

Cannot find EnterpriseLibraryCoreExtension in Ent Lib 6.0

first post: rsaa wrote: Hi, I'm using Unity and Ent Lib 5.0 Logging block in asp.net mvc ...

latest post: randylevy wrote: EnterpriseLibraryCoreExtension has been removed in the latest versi...

Unity 3 Nuget package for Microsoft.Practices.Unity.Mvc.dll

first post: Sirus555 wrote: Hello, I can't find nuget package for the MVC part of Unity 3. ...

latest post: randylevy wrote: You can find the two packages here: * [Unity bootstrapper for ASP....

Why emitting IL?

first post: yuanfei wrote: I'm learning the code of Unity1.2, and found in the process of reso...

latest post: randylevy wrote: I would guess the main reason would have been performance. As an a...

Is there way to determine the point of time when all dependencies are already injected?

first post: AlexNc wrote: I have several dependency properties in my class that were marked w...

latest post: rslaney wrote: glad to know it's worked. There is no easy solution for getting ar...