Debug.WriteLine ?

Jul 25, 2009 at 11:11 PM

Is there an easy way to Debug.WriteLine to the T4 Editor Output window?  I can't seem to get this to work...

Coordinator
Jul 26, 2009 at 3:26 AM

It would be nice to have, but require additional work. I went ahead and submitted an enhancement request with details of how this could be done:

http://t4toolbox.codeplex.com/WorkItem/View.aspx?WorkItemId=13707

 Would you be interested in implementing it?

Jul 26, 2009 at 5:01 PM
Edited Jul 26, 2009 at 5:17 PM

Sure thing, boss.  I got the Window Output working.  Hooking up the TraceListener will be another thing.  Are you suggesting I become a contributor for this to happen? :P

EDIT: Just got the TraceListener working, no prob.  I think this is something that should be added into the TransformationContext when it initializes.  Would sure be nice.

I can add this to the project if you'd like.  Or let me know and I'll send it to you however you want.

Coordinator
Jul 28, 2009 at 10:27 AM

Thanks, Michael. I agree with the suggestion to add this listener to Debug.Listeners in the TransformationContext class. OnTransformationStarted method would be appropriate for this.

Could you implement this locally and upload modified files as a patch?

Jul 28, 2009 at 1:04 PM

Done.  I was getting build errors with BizTalk (don't have it installed) so I couldn't quite verify if it works, but it should be good to go. :)

Coordinator
Jul 29, 2009 at 2:06 AM

I don't have it either - I simply comment out the BizTalk tasks in the SDC tasks file.