AlainD
AlainD

Reputation: 6625

Assign executable file name for debug session (Visual Studio 2019)

We have a legacy Visual Studio 2003.NET C++ DLL project. Still works with VS2003 on Windows 10 but we're looking to migrate to VS2019.

In VS2003 when you debug (F5), the box Executable for Debugging Session pops up. In the Executable file name box you select Browse... and navigate to the .EXE which will consume your DLL. Great!

Browse for executable

But how to do the same in VS2019? Whenever I debug, Visual Studio thinks I'm using the Local Windows Debugger and I get the error "[PATH][PROJECT].dll is not a valid Win32 application". The Debug > Attach to Process... option is not right either because my target executable is not running yet.

Upvotes: 1

Views: 707

Answers (1)

Adrian McCarthy
Adrian McCarthy

Reputation: 48021

If I'm understanding the problem correctly, I think you want to select the Debugging section of your DLL project's property pages. There you can choose which debugger to use and you can even set the executable you want to launch.

The debugging properties page for a DLL project.

Upvotes: 2

Related Questions