What tool would you choose for generating multiple C# files for WCF contract versioning?
I have some breaking changes to WCF contracts and I want to be able to support two versions of the contracts from within the same website.
somewhere.com.catalog.v1
class A
class B...
somewhere.com.catalog.v2
class A
class B
I would开发者_C百科 like to have a utility program to copy the files from v1, into v2 and change all the namespace references so I don't have to do a manual copy and find & replace.
- T4 template - need to parameterize this. I found a custom templating project on codeplex.
- PowerShell script. Found Aaron Lerch's blog which seems to be close to what I wanted, but I have the worst problems with PowerShell and got a compile error. I tried downloading some PowerShell extensions for Visual Studio 2010 to get auto-complete but ran into extension conflicts.
- Razor template. From what I read it seems to be targeted to single file generation.
- MSBuild task using the TextTransform utility.
- Just create a command line C# program that takes in the input folder, output folder and new namespace.
- Other _______
Just having trouble choosing the best tool for the job and wanting to learn something new that can be applied in other situations.
精彩评论