Aspire doesn't add development certificate to dev-certs storage
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
When I start debugging a project from vs-code I get a Windows warning to approve a dev certificate.
I approved the dialog but I cannot find the certificate in dev-certs storage!
### Expected Behavior
The dev certificate should be found in `dotnet dev-certs`. Most likely the certificate is now stored in `certmgr` and I have to go find it there which is a laborious process.
I expect the behaviour to be the same with `Visual Studio` where the dialog looks more modern (it seems it uses a Windows native message box) and to add the certificate to dev-certs.
Also if I refuse the dev certificate I should not get the warning every time I start debugging. Visual Studio doesn't bother me twice after I refuse the certificate.
### Steps To Reproduce
https://github.com/AntonVonDelta/GithubIssuesAspireApp1
Or remove the dev cert locally and just start any aspire project in vs code with https disabled.
### Exceptions (if any)
_No response_
### .NET Version info
.NET SDK:
Version: 10.0.201
Commit: 4d3023de60
Workload version: 10.0.200-manifests.121cc9e6
MSBuild version: 18.3.0-release-26153-122+4d3023de6
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\10.0.201\
.NET workloads installed:
[maccatalyst]
Installation Source: VS 18.4.11620.152
Manifest Version: 26.2.10217/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maccatalyst\26.2.10217\WorkloadManifest.json
Install Type: Msi
[ios]
Installation Source: VS 18.4.11620.152
Manifest Version: 26.2.10217/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.ios\26.2.10217\WorkloadManifest.json
Install Type: Msi
[android]
Installation Source: VS 18.4.11620.152
Manifest Version: 36.1.30/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.android\36.1.30\WorkloadManifest.json
Install Type: Msi
[maui-windows]
Installation Source: VS 18.4.11620.152
Manifest Version: 10.0.20/10.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\10.0.100\microsoft.net.sdk.maui\10.0.20\WorkloadManifest.json
Install Type: Msi
Configured to use workload sets when installing new manifests.
No workload sets are installed. Run "dotnet workload restore" to install a workload set.
Host:
Version: 10.0.5
Architecture: x64
Commit: a612c2a105
.NET SDKs installed:
8.0.125 [C:\Program Files\dotnet\sdk]
9.0.305 [C:\Program Files\dotnet\sdk]
10.0.201 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.25 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.25 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.32 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.25 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 10.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
### Anything else?
I recently switched from Visual Studio to vs-code. I use aspire nuget version 13.1.3 and net core 10 in all of my projects.
I do not have any https profile enabled, just http and ASPIRE_ALLOW_UNSECURED_TRANSPORT environment activated.
In vs-code I added the aspire extension.
Contributor guide
Research direction
Start with the linked GitHubIssuesAspireApp1 reproduction and the Aspire VS Code debugging path described in the issue. Compare how the development certificate is handled with `dotnet dev-certs` and Visual Studio, including the refusal flow. Done means an approved certificate appears in dev-certs storage and refusing it does not trigger the warning on every debug start.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, vscode
- Domain
- developer-experience, devtools, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100