Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat tool would you choose for generating multiple C# files for WCF contract versioning?
    text
    copied!<p>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.</p> <pre><code> somewhere.com.catalog.v1 class A class B... somewhere.com.catalog.v2 class A class B </code></pre> <p>I would 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 &amp; replace.</p> <ol> <li>T4 template - need to parameterize this. I found a <a href="http://customtemplating.codeplex.com/" rel="nofollow">custom templating</a> project on codeplex.</li> <li>PowerShell script. Found <a href="http://weblogs.asp.net/aaronlerch/archive/2008/01/04/refactoring-c-with-powershell.aspx" rel="nofollow">Aaron Lerch's blog</a> 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.</li> <li>Razor template. From what I read it seems to be targeted to single file generation.</li> <li>MSBuild task using the TextTransform utility.</li> <li>Just create a command line C# program that takes in the input folder, output folder and new namespace.</li> <li>Other <strong><em>_</em>__<em>_</em>__<em>_</em></strong></li> </ol> <p>Just having trouble choosing the best tool for the job and wanting to learn something new that can be applied in other situations. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload