Now we will create a new multiplatform .NET Core 2 console app. We will install the necessary NuGet packages to work with the Cosmos DB SDK and make it easy to use a JSON configuration file for our application.
In Visual Studio, select File | New | Project and select Visual C# | .NET Core | Console App (.NET Core). Enter SampleApp1 for the project name. The code file for the sample is included in the learning_cosmos_db_04_01 folder in the dot_net_core_2_samples/SampleApp1/SampleApp1.sln file.
Install the NuGet packages and versions detailed in the next table. If there are newer versions available, you will have to verify the change log to make sure that there are no breaking changes. The sample has been tested with the specified versions:
Package name |
Version |
Microsoft.Azure.DocumentDB.Core |
2.0.0 |
Microsoft... |