To deploy applications written with dotConnect for MongoDB, you should register run-time assemblies Devart.Data.MongoDB.dll and Devart.Data.dll in the Global Assembly Cache (GAC) for the appropriate framework or place them in the folder of your application (Bin folder for web projects). These two assemblies should be available in all applications written with dotConnect for MongoDB.
Your application should also have access to the native libraries libmongoc-1.0.dll, libbson-1.0.dll, sqlite3.dll, and vcruntime140.dll. The bitness (32-bit or 64-bit) of the libraries must correspond to the bitness of your application. The provider looks for them next to its own assembly: in the Native\win-<arch>, runtimes\win-<arch>\native, and <arch> subfolders and in the folder itself, then in the application folder and in the installation folder. Here <arch> is x86, x64, or arm64, depending on the process. To make the provider use another folder, specify it in the Native Library Path connection string parameter.
The libraries for arm64 are not included in the distribution: an x64 process on Windows on Arm uses the x64 libraries. The NuGet package copies the libraries by itself.
Another way to install the needed *.dll files is to launch the dotConnect for MongoDB setup program and choose "Minimal installation". Note that, according to the End-User License Agreement, this is the only installation you can do on the target machine. You must not distribute any other part of dotConnect for MongoDB.
When your code uses dotConnect for MongoDB via a factory-based class, you should register configuration information in the DbProviderFactories section of the *.config file to inform your environment about the existence of the provider factory. The provider factory is described either in machine.config (globally), in app.config, or in web.config (just for your application). This is done as follows:
Replace 1.0.0.0 here with your actual version.
If you set up a pipeline for compiling your source code from a repository on a build server periodically or even after every commit, you should add a step to your pipeline for installing the provider on the build server and copying Devart.* assemblies. For example, the corresponding step in Azure DevOps Pipeline can be the following one if you copied the provider installation to the root folder of your repository:
For more information about the command line installation keys, see Installation.
When deploying Entity Framework Core projects, you need to deploy the Devart.Data.MongoDB.EFCore.dll assembly. It is available only in the Devart.Data.MongoDB.EFCore NuGet package.