A brief explanation on debugging msbuild tasks. Anything done on CLI (command-line interface) should be done in a Visual Studio Developer Command Prompt. If you have VS installed, search for "Developer command prompt."
This also works for dotnet
builds.
- Have VS open & breakpoint into your custom task.
- Open up a developer command prompt.
cd your/project/directory
set MSBUILDDEBUGONSTART=1