Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Open your Visual Studio > right-click in your project > select the option “Manage User Secrets”
    Note: I created this documentation with Visual Studio 2022

    Note: the secrets are storage on C:\Users\<windowsuser>\AppData\Roaming\Microsoft\UserSecrets. To create a secret by command line, you can use

    Code Block
    dotnet user-secrets set "Movies:ServiceApiKey" "12345"

  2. Add this structure and run your project


    Note: If you have this error when you run the project, maybe the structure of the keys is not correct.

...