I want to share a recent experience and a problem with you:
We did a "publish" on our project recently and we discovered that it didn't work and left us with a black screen. Whereas it works when we run it from the source code. It turns out that when we publish it, it gets exported with acknet.dll. We use cURL in our project and unbeknownst to us, this DLL is also compiled with cURL as a static library. Both our dll and acknet.dll expose similar functions so when the engine searches for a external function, it finds acknet first(because it searches alphabetically) and uses its functions. This didn't work for us probably because versions were different and it failed somewhere. Luckily I found this out during a debugging session but it could pass by many unfortunate souls.

I wish we could choose which DLL we want functions to be loaded because this also poses a vulnerability: any DLL can be added next to the executable with name like ___foo.dll to hijack a function.