Skip to content

Instantly share code, notes, and snippets.

View ChumboMJ's full-sized avatar
😁

Tim Forste ChumboMJ

😁
View GitHub Profile
@ChumboMJ
ChumboMJ / dn8VSReactError.md
Last active June 2, 2025 16:47
How to Resolve: Visual Studio .NET 8 / .NET 9 React Project vite build "Error: Could not Create Certificate"

When creating a fresh .NET Core 8 React project on a fresh developer machine using Visual Studio 2022, I found that I was getting an error that was preventing the application from running locally. Specifically, the errors "Error: Could Not Create Certificate" and "There was an error exporting the HTTPS developer certificate to a file. Please create the target directory before exporting. Choose permissions carefully when creating it." After a little time digging into and little success finding documentation on the issue, I finally sloved my error.

Prerequisites

  • This applies to any development machines that do not already have a folder created at %APPDATA%\ASP.NET\https OR your app home directory (Generally C:\Users\USERNAME or use %HOMEPATH%)

Steps to Reproduce the Error

  1. Open Visual Studio
  2. Choose "Create a New Project"
  3. Select "React and ASP.NET Core" Javascript and Web app from the options
  4. Try running your application!