14

Are there any free/open source alternatives to Codesmith that would be comparable in features and generate .NET code?

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
e11s
  • 4,123
  • 3
  • 29
  • 28
  • If you want a different take on template-based code generators, this tool is free. [www.metadrone.com](http://www.metadrone.com) – Steve Sep 19 '11 at 05:22
  • Let's have a look at this question : http://stackoverflow.com/questions/24035599/is-there-any-freeware-tool-available-which-is-like-codesmith – lgu Jun 16 '15 at 16:11

5 Answers5

9

Depending on your needs, Visual Studio's T4 (Text Template Transformation Toolkit) might be worth a look. Check out Scott Hanselman's article for an introduction.

M4N
  • 94,805
  • 45
  • 217
  • 260
5

i did the same research a few years ago and found MyGeneration to be very good.

Tracker1
  • 19,103
  • 12
  • 80
  • 106
Paul Sasik
  • 79,492
  • 20
  • 149
  • 189
  • 1
    MyGeneration is an excellent code generation and templating tool. Given that its open source as well is a defenite plus. The underly MyMeta API is useful from within your own applications as well and is very powerful. – Jafin May 27 '10 at 07:01
  • 2
    Link to MyGeneration is dead. – Vaccano May 27 '15 at 23:55
2

There is a deal where you can get CodeSmith for free (limited time), Check out plinqo.com for more information. Although there are many free and paid alternatives. I think it would be a very wise move for anyone to check out the support options and community behind other Code Generators.

If you go to say a product like My Generation and run into a bug, there is no one to help you but yourself.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Blake Niemyjski
  • 3,432
  • 3
  • 25
  • 41
2

Codesmith 2.6 is freeware - http://www.codesmithtools.com/freeware.aspx

There is nothing you can't do with version 2.6 - the later versions simply fix a few minor bugs and add a few bells and whistles.

Bermo
  • 4,921
  • 1
  • 28
  • 31
  • 4
    It should be noted that this version only works on an older version of Visual Studio (2003 if I remember correctly). Also, it is very buggy and would inexplicably quit working at times. I finally gave up and started coding manually as the templates were useless without working software and troubleshooting took more time than writing the new class. – NightOwl888 Aug 08 '12 at 18:44
-1

I just find this tool I am already playing with it and until now it looks very promising: https://moplus.codeplex.com/. You can use it within Visual Studio