Alex Rivera | Logout

How to debug MSBuild Customtask

Asked 2008-12-10T20:13:56.213
24

I'm trying to debug the MSBuild Customtask, that I have just created, but for some reason it never stops at the breakpoint. I've even tried this:

    public override bool Execute()
    {
        System.Diagnostics.Debugger.Break();

And added a break point on that line... I even eliminated all the other code in the method and that didn't change anything.

Is there anything special required to be able to debug the creation of custom tasks for MSBuild ?

Edit
Report

1 Answer

10

This is what I do... In the Project Properties dialog on the Debug Tab Select "Start an External App" - put C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe in the box..

Then in the command line parms, put your arguments /Target:Whatever test.proj

Put a code stop in your custom task and start the app..

answered 2008-12-11T21:49:13.960

Your Answer