I updated .NET Core 1.0.1 to .NET Core 1.1.0, and am no longer able to ‘Start Debugging’ (F5) from Visual Studio 2015.
When I tried to debug, I’d get the following error in the output console in Visual Studio:
The program ' dotnet.exe' has exited with code -2147450751 (0x80008081). The program ' iisexpress.exe' has exited with code 0 (0x0).
The latest version of .NET Core is 1.1 (1.1.0 if you’re a package manager type), but Visual Studio 2015 only supports F5 Debugging with .NET Core 1.0.1.
You can still debug .NET Core 1.1.0 Applications in Visual Studio 2015, however. Here’s how:
Open the Package Manager Console (or use cmd.exe).
dotnet run from either console.
You should see the following prompt:
Go to the debug menu in Visual Studio and click “Attach to Process” (or use the Ctrl+Alt+P shortcut).
Look for dotnet.exe, and hold down shift while selecting all the dotnet.exe processes (it’s one of those three; and you can actually select all at the same time).
Click the “Attach” button.
You’ll know you’re debugging because set breakpoints will change from clear interiors to a red interior (indicating the breakpoints have been loaded).