Search code examples
windows.net-core

What is the default location for certificates created using "dotnet dev-certs https"


Following dot net core CLI command allows one to create a certificate.

dotnet dev-certs https

This command has an optional parameter for specifying an export path. Does anyone know where the certificate goes if this path is not specified?

It seems like the help output of the command: dotnet dev-certs --help does not seem to contain this information and I have not been able to locate much details on this at other sources either.


Solution

  • Looks like by default it goes into the current user's (logged on user's) personal certificate store:

    Screenshot

    Update:

    Adding clarification based on comments.

    According to the documentation: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-dev-certs:

    • The physical location of the certificate is an implementation detail of the .NET runtime that could change at any time.
    • And, if you are looking to use the certificate with other tools you can use --export-path