Install Realm for .NET¶
For more information about specific version support for .NET, UWP, and Xamarin, see Supported Platforms.
Before getting started, ensure you have installed Visual Studio:
Follow these steps to add the MongoDB Realm .NET SDK to your project.
Open the NuGet Package Manager¶
Under the Project menu, select Manage NuGet Packages... to open the NuGet Package management window.
Add the Realm Package¶
In the search bar, search for Realm. Select the result and click Add Package. When prompted, select all projects and click Ok.
Be sure to check the "Show pre-release packages" checkbox!
(Optional) Add the Realm Weaver to FodyWeavers.xml¶
You can skip this step if you were not already using
Fody in your project.
Visual Studio will generate a properly-configured
FodyWeavers.xml file for you when you first build.
If your project was already using Fody, you must manually add the
Realm weaver to your
FodyWeavers.xml file. When done,
FodyWeavers.xml file should look something like
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> <Realm /> </Weavers>
Add the following line to the top of your source files to use MongoDB Realm: