On windows:
- From start menu, open "Manage computer certificates"
- In "Personal/Certificates", locate the "localhost" certificate and open it
- Copy it's Thumbprint and keep it for later (beware, there are hidden characters at the beginning and/or the end)
- In your csproj file, locate the "PackageTags" tag. Copy it's value and keep it for later.
- Open a command promt and type in the following command
netsh http add sslcert ipport=127.0.0.1:<your-port-num> certhash=<localhost-certificate-hash> appid={<package-tags-of-csproj>}