VS: Fix custom commands for DOTNET_SDK builds

Fixes: #23723
7 files changed