This project has moved. For the latest updates, please go here.


EnterpriseLibrary conflict


Little puzzling this one as I cant see any reference to enterpriselibrary.common within the owin dependencies so apologies if I have this incorrect.

I have another object within my application that requires enterpriselibrary.validation, which it self requires enterpriselibrary.common v6.

When I try and run my web app, with owin, I get:


As I couldn't to discern any obvious link to an owin dependency I completely removed enterpriselibrary.common at which point I would get:


Subsequently I have managed to get my owin implementation to run successfully with enterpriselibrary.common v5.0.5 installed, unfortunately this isnt compatible with my other objects (which require version 6).

I should say that I am trying to implement this alongside episerver (see this thread here for further details

The package versions I am using are as follows:


Appreciate any pointers.
Closed Mar 2 at 10:55 PM by mgirgin


Tratcher wrote Feb 13, 2015 at 5:41 PM

Your first stack trace indicates that Owin.Loader.DefaultLoader.SearchForStarupAttribute is trying to scan through your application assemblies looking for your Startup class. Katana doesn't depend on enterpriselibrary.common, it's trying to load your assembly that does.

The error is most likely caused by an incorrect version dependency when it loads an assembly. The second error says that you require version 5.0.414.0, where the first error says you tried to load .Net does not allow mixing versions by default, you have to manually override it by adding binding redirects to your web.config file.

Nuget should have added these for you, but sometimes it misses a few.

ajVersed wrote Feb 13, 2015 at 7:25 PM

hi Tratcher,

So just to clear up, as I put above, the reason the second error mentions v5 is because I completely removed my v6 assembly. I wanted to see if anything was still looking for enterpriselibrary, which then prompted the v5 error message when katana is trying to find the startup class.

I think its probably episerver looking for the v5 enterpriselibrary and I know my other object requires the v6 so I can check the binding redirects like you mention (cheers).

Its only the katana scan that is prompting this though because without it added I dont receive these errors.

ajVersed wrote Feb 16, 2015 at 9:57 AM

hi Tratcher, so I double checked and we do have an assembly redirect in the project. all versions of EL are redirected to v6. As you can see in the first screenshot there is a breaking change between v5 and v6.

What I dont understand is this exception only occurs once the start up scan is turned on and it starts looking for the startup class. If I remove all the owin bits this project runs fine, yet there's no dependency in owin on EL, im stumped.