Custom task and TLDA

I have a target involving a custom task that looks as follows:

<Target Name="MakeWrappers" Inputs="@(WrapperProjects)" Outputs="@(WrapperProjects->'%(rootdir)%(directory)dotNET\%(filename)\%(filename).cpp'" DependsOnTargets="ConvertElso;ConvertProjectModules;ConvertWrappers">

<!-- Generate .sln:s for the devices -->

<XmlParsePy InputFiles="@(WrapperProjects)" DotNet="true">

<Output TaskParameter="CreatedSolutions" ItemName="WrapperSolutions" />

</XmlParsePy>

</Target>

..which works, but is called each time for all files, even though the inputs have not changed

What am I missing here




Answer this question

Custom task and TLDA

  • BrianXL

    After checking the paths more thoroughly and running msbuild with /v:d it turns out that I was missing an end parenthesis in the outputs, and thusly had unbalanced parentheses.
    After adding that, it worked as expected..

    (Shouldn't it be possible to check for such a thing and issue a warning or something that is visible with default verbosity )

    Output file "@(WrapperProjects->'C:\GSP\Instr\Slave\Apps\MeasYTrack\dotNET\MeasYTrack\MeasYTrack.cpp'" does not exist.



  • sjmueller

    Done, as FDBK45170


  • Mitchell Vincent

    Hi,

    Incremental building (the mechanism that skips up to date targets) is driven entirely by Inputs & Outputs. So evidently msbuild thinks that atleast one of your outputs is out of date with respect to its input. Are they all up to date If so then you need to examine your WrappersProjects transofmration that is specified in the outputs. You can simply print them to the screen using the Message task. Make sure this is the actualy location that the files are being written to.

    Sayed Ibrahim Hashimi

    www.sedodream.com


  • joe20050

    Simon,

    I'd suggest logging a suggestion through the MSDN Product Feedback site regarding the error checking for ). That way we can track it and consider it for our next release.

    Neil



  • Custom task and TLDA