开发者

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.

  1. T4 template - need to parameterize this. I found a custom templating project on codeplex.
  2. 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.
  3. Razor template. From what I read it seems to be targeted to single file generation.
  4. MSBuild task using the TextTransform utility.
  5. Just create a command line C# program that takes in the input folder, output folder and new namespace.
  6. Other _______

Just having trouble choosing the best tool for the job and wanting to learn something new that can be applied in other situations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜