Autofac lives in a NuGet package that we need to install, and we need to reference it in our project files. Proceed as follows:
- Open up the NuGet package manager by right-clicking on the Solution node and clicking on Manage NuGet Packages for Solution... .
- Click on Browse, and type Autofac in the search box.
- Tick all the checkboxes under Project, scroll down, and click Install.
Refer to the following screenshot to view the preceding information:
This will download and install Autofac into all your projects. The next step is to add some code that will allow us to use Autofac.