I am using the MSBuild copy and then Concat to concatenate multiple SQL files. Some of the SQL files are in some other format (opens in notepad), but after Concat gets to the files, there are strange characters all over the resulting files.
Can anyone help me, has anyone experienced this before? How can I convert all SQL files to ascii, or make the Concat task work properly?
Well I got around it by writing a utility C# class. It is not designed to handle exceptions, they are handled by the calling class or unhandled in the console.
It converts the files to ASCII, removes any invalid characters and rewrites the files.
I spent a while wondering why I was getting access-denied issues, make sure you have all the files you want to convert checked out before you convert them!
Here it is if you are interested: