itaskitem

MSBuild ITaskItem array is out of date

I'm creating a custom ITask for MSBuild which uploads the output files of my build. I'm using a web deployment project to publish my app and hooking in to the AfterBuild target to do my custom work. If I add a file to my web application, the first time I do a build, my custom task is not recognizing the recently added file. In order fo...

Generating Code in an MSBuild task

I am creating an MSBuild task that will generate one or more files, I have a Task with an [output] property that is of type ITaskItem[]. My question is, do I need to implement that interface myself or is there a class I can use already? I want them to be Compile task items that get added to the list of files to compile. ...

How to pass data to an ITaskItem property of an MSBuild task?

Hi folks, i have a custom Task which i use in MSBuild. Works great. Previously, i had some properties which accepted some string data. It was suggested I should change them to ITaskItem's. This way, if i have spaces, i shouldn't have a problem. Previous code public class CompressorTask : Task { .... public string CssFile...

MSBuild ITaskItem RecursiveDir metadata disappears

I have a custom MSBuild task, which processes a set of files and returns a modified subset of this. Basically, I just create a new ITaskItem array out of the input, skipping some items. However, the RecursiveDir metadata disappears when this result set is returned to MSBuild! It is still with the correct values at the end of my custom t...

MSBuild get %(RecursiveDir) directive from custom task parameter

I'm developing a custom MSBuild task by inheriting from the base Task class. My task calls the Copy task declared in Microsoft.Build.Tasks.dll setting the DestinationFolder property in the process. My custom task has a property called DestinationFolder declared as public ITaskItem DestinationFolder { get; set; } When calling this tas...