3

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.

Ira Baxter
  • 93,541
  • 22
  • 172
  • 341
justin.m.chase
  • 13,061
  • 8
  • 52
  • 100

1 Answers1

2

It turns out there is a TaskItem class already. It's pretty general but should work just fine. If you set the ItemName="Compile" on the output element in your targets file it will create them as Compile items and add them to the collection. No problem

justin.m.chase
  • 13,061
  • 8
  • 52
  • 100