Always Encrypted Guide Results in Build Error

Nathan R 1 Reputation point

I'm receiving a build error while trying to follow along with the Always Encrypted guide here:

I transplanted this into a console app which is now a direct copy paste from the docs and am getting the same error

'EncryptionKeyWrapMetadata' is inaccessible due to its protection level  


Here are the packages and versions in use:

Where am I going wrong here?

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,351 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Saurabh Sharma 23,251 Reputation points Microsoft Employee

    Hi @Nathan R ,
    Thanks for using Microsoft Q&A !!
    I have tried using the sample and it works fine and I am able to build the solution without any issues.
    I have only installed only two packages -

    • Install-Package Microsoft.Data.Encryption.AzureKeyVaultProvider -Version 0.2.0-pre and
    • Install-Package Microsoft.Azure.Cosmos.Encryption -Version 1.0.0-previewV18

    Looks like these to nuget packages are taking care of other dependencies. Can you please try building it again by removing other two packages - Azure.Identity and Microsoft.Azure.Cosmos

    Please let me know if you have any questions.


    1 person found this answer helpful.