Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

DI in MVC6 - Replacing default with Autofac

$
0
0

Hi,

I am struggling to get DI working in MVC 6 - I am using VS 2015 and all projects outputting and using the DNX451.

When I try to replace the in-built version with Autofac. All the examples I have seen include this line...

builder.Populate(services);


This causes an error saying I have to reference the Microsoft.....DependacyInjection.Interfaces dll...

If I do that I then get a conflict saying IServiceProvider is defined in two places... I have tried using the ....DependancyInjection.Abstractions but that doesn't work either... I can't find any working example of doing this!!
reference error


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>