Accessing the CData section of an Item

What would be the best way to pass a CData section as an ITaskItem to a task? We added a task called EMail that emails out build notifications. I want to be able to pass a formatted HTML string as an input to the task.

I can't do it with a standard attribute. If you add an ItemGroup and then an item, it lets you add a Cdata section underneath it, but the build engine complains and says it is not a recognized element. So that doesn't work either.

I also did not see a way to reference a CData item off the ITaskItem in code unless there is some way to use GetMetaData to access the info.

I'm just passing in a file right now and have the task read in the HTML from the file. It would be nice, to specify the text you want to email in HTML format right inside the build profile, however.

Thanks in advance for any pointers.

[838 byte] By [Gerhardo] at [2007-12-16]
# 1
I figured it out. You just create a property and add it as a CData section there. If you pass in the property as a task argument, it passes up the HTML string correctly.
Gerhardo at 2007-9-9 > top of Msdn Tech,Visual Studio,Visual Studio MSBuild...

Visual Studio

Site Classified