BenjaminD
BenjaminD

Reputation: 29

An error occurred attempting to determine the process id of dotnet.exe which is hosting your application - Starts without debugging

I have been researching this issue for hours now but none of the solutions have worked so far.

I have followed the various instructions in this post, but none of them worked: An error occurred attempting to determine the process id of dotnet.exe which is hosting your application. One or more error occured

Here is what my current launchSettings look like:

{
  "iisSettings": {
    "windowsAuthentication": true,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:51763/",
      "sslPort": 44324
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    "HydroAuth.Admin": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "http://localhost:51764/"
    }
  }
}

What have I tried so far?

Questions

Restrictions

Thank you for any advice in advance!

Upvotes: 0

Views: 371

Answers (1)

BenjaminD
BenjaminD

Reputation: 29

There is a workaround, it's not very clean but does the job for now.

I hope if anyone else runs into this issue may find this useful.

  1. Step one is to run the project without debug like before.
  2. In VS head to (top toolbar) Debug>Attach to Process... enter image description here
  3. Find dotnet.exe and click Attach. enter image description here

This should allow you to debug the code, it might not work as well as native debug, but for now it will have to do.

Upvotes: 0

Related Questions