> All the [startup templates](Startup-Templates/Index.md) and samples are Autofac integrated. So, most of the time you don't need to manually install this package.
Install [Volo.Abp.Autofac](https://www.nuget.org/packages/Volo.Abp.Autofac) nuget package to your project (for a multi-projects application, it's suggested to add to the executable/web project).
If you're not using a startup template, you can use the [ABP CLI](CLI.md) to install it to your project. Execute the following command in the folder that contains the .csproj file of your project (suggested to add it to the executable/web project):
````bash
abp add-package Volo.Abp.Autofac
````
Install-Package Volo.Abp.Autofac
````
Then add `AbpAutofacModule` dependency to your module:
```csharp
using Volo.Abp.Modularity;
using Volo.Abp.Autofac;
namespace MyCompany.MyProject
{
[DependsOn(typeof(AbpAutofacModule))]
public class MyModule : AbpModule
{
//...
}
}
```
> If you haven't done it yet, you first need to install the [ABP CLI](CLI.md). For other installation options, see [the package description page](https://abp.io/package-detail/Volo.Abp.Autofac).
>
Finally, configure `AbpApplicationCreationOptions` to replace default dependency injection services by Autofac. It depends on the application type.
@ -12,7 +12,7 @@ ABP offers a simple, dynamic, powerful, modular and built-in way.
> This package is already installed by default with the startup templates. So, most of the time, you don't need to install it manually.
If you're not using a startup template, then execute the following command in the folder that contains the .csproj file of your project:
If you're not using a startup template, you can use the [ABP CLI](../../CLI.md) to install it to your project. Execute the following command in the folder that contains the .csproj file of your project:
@ -294,7 +294,7 @@ Using the built-in contributors for standard packages;
> This package is already installed by default in the startup templates. So, most of the time, you don't need to install it manually.
If you're not using a startup template, then execute the following command in the folder that contains the .csproj file of your project:
If you're not using a startup template, you can use the [ABP CLI](../../CLI.md) to install it to your project. Execute the following command in the folder that contains the .csproj file of your project: