[Request] Post-build event for mspdbsrv.exe

So I’ve finally found a solution to bug report #7508 (mspdbsrv.exe not closing after build) but since it is closed and not really a TrinityCore bug I thought I’d ask here instead:

I noticed in ProcessExplorer that mspdbsrv.exe is started with the -start and -spawn switches:

D:vs9Common7IDEmspdbsrv.exe -start -spawn

So I played around with some “common sense” switches and found to close it, simply use -stop without -spawn:

D:vs9Common7IDEmspdbsrv.exe -stop

This will close the running process without having to kill it using Taskmanager. Is it possible for someone to add a post-build event for this? I don’t know enough about events with CMake to do that.


You can try placing this in worldserver’s directory CMakeLists.txt, at line 185 (in if(WIN32) block)

[CODE] add_custom_command(TARGET worldserver
COMMAND “C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\mspdbsrv.exe” ARGS “-stop”
COMMENT “Stopping mspdbsrv”)


however from my experience it would always report the build as failure even if it succeeded (and killed mspdbsrv in the process)


Would this only kill it at the end of the solution when it says “x succeeded, x failed, x already up to date” or would this kill it at the end of every project?

At the end of worldserver build (cant hook solution, must be project)

Thanks, I’ll try it out.