MSBuild.ExtensionPack.FileSystem.File task Replace shows prepended characters

Dec 8, 2009 at 2:32 PM


I am using the task MSBuild.ExtensionPack.FileSystem.File TaskAction="Replace".  When the task is completed, the contents of the updated file shows extra characters prepended in the first line.  These are the two characters ∩╗┐  . 

This is visible in the Command prompt in Windows as in when I do a "more filename".  Not visible when using a text editor.

Please let me know what I am doing wrong.


Dec 8, 2009 at 2:36 PM

Looks like its not getting the encoding right. Can you try be specifying the encoding, e.g. TextEncoding="UTF8"

Dec 8, 2009 at 3:01 PM

I added the TextEncoding="UTF-8" as shown below and I still have the issue

<MSBuild.ExtensionPack.FileSystem.File TaskAction="Replace" TextEncoding="UTF-8"


Dec 8, 2009 at 3:43 PM

I tried TextEncoding="windows-1252" and it resolved the issue.