I'm trying to use protobuf in my application as dlls (libprotobuf-lite.dll and libprotobuf.dll). I installed protobuf using vcpkg, and everything works perfectly fine in the Release configuration. However, if I build my solution (using Visual Studio) in Debug configuration, I get debug assertion errors. I was able to track this down to a problem with the protobuf dlls used.
If I compile the solution, Visual Studio (or vcpkg) copies the necessary dlls from the vcpkg folder to the solution folder. As I said, this works perfectly fine for Release. However, in Debug, it copies the same dlls instead of the debug dlls (libprotobufd.dll and libprotobuf-lited.dll).
So my question is: How can I configure vcpkg and Visual Studio 2019 such that it uses the correct dlls?