Source Transformations, Compilation and Unit Tests

Topics: General
May 11, 2013 at 4:40 AM

I would like to create a nuget package with some source transformations to update the namespaces of the classes. I understand how this works, but my problem is that if I add the tokens and change the extensions of my .cs files to be .cs.pp, then they can no longer be compiled due to the tokens in the file. Because of this, I can't unit test my code anymore.

I was thinking using a T4 template to tokenize and change the extensions to be .pp before I re publish the package.

Does this seem like a good solution? Has anyone else got any good suggestions on how to get round this?

Thanks in advance,
May 13, 2013 at 9:33 PM
Yes, it looks like a good solution.