Riddick
Riddick

Reputation: 339

Visual Studio cannot start debugging for C++ project 0x80070057

Randomly (and infrequently), Visual Studio (2017) will abruptly refuse to run my C++ project. This will suddenly start happening in the middle of a session.

Visual Studio will still build the project and generate the executable, however, the following cryptic error message appears every time I want to run my program. No changes were made to the configuration or project and it strangely happens after an innocent build.

visual studio error message

(It goes without saying but I tried extensively checking for solutions to this problem and no solution worked or was applicable)

Whether I add a new configuration setting or play with the existing settings (Release/Debug, x86/x64), nothing fixes it except performing a full repair (and that takes a very long time). Creating a new project didn't help either, but running it in VS 2015 is successful.

This happens approximately once a week, so I would greatly appreciate knowing how this error can be fixed (or at least avoided).

Upvotes: 1

Views: 686

Answers (2)

Péter Major
Péter Major

Reputation: 188

This is usually caused by VS mixing release and debug binaries for me. I have a script which cleans all the output directories, including the garbage VS puts into the projects .vs and Windows Temp folder. This always fixes the issue for me.

Upvotes: 0

Riddick
Riddick

Reputation: 339

After some more experience with it, it appears just to be an issue with Visual Studio when builds are too large and executed too often (it happened to multiple computers). More specifically, it could come about as a result of using many templates and applying a large number of explicit template specializations. By building with only the template specializations I need for testing, the issue doesn't come up.

Upvotes: 1

Related Questions