You're not being creative enough. Any compile-time parameter can be trivially turned into a runtime-detected one:
void main()
{
if(ShouldUseVS("thirdpartycomponent.dll"))
ShellExecute("app_with_vs.exe"); // compiled without VS
else
ShellExecute("app_without_vs.exe"); // compiled with VS
}