Click here to Skip to main content
Licence 
First Posted 25 Sep 2004
Views 18,387
Bookmarked 11 times

Code Generation tools complementing generics

By | 25 Sep 2004 | Article
A palette of code generation tools for VS.NET.

Introduction

Over two years ago I discovered this deficiency of VS.NET IDE – lack of preprocessing for C# sources. At that time the solution was quickly found, and the palette of tools has grown since then.

Attached archive contains four code generators (with their custom tool names):

  • C preprocessor- “codegens.pp” to use MS compiler CL, or “codegens.cpp” for CPP (usually found in GNU tools packages like Cygwin).
  • PERL- “codegens.perl” (get installed as ActivePerl or via Cygwin).
  • Spawned process- “codegens.spawn”.
  • XSLT transformed XML- “codegens.xslt”.

Using the code

Simply register a pre-built assembly with “regasm/codebase codegens.dll” and you’re ready to use the custom tools.

I recommend you to start with samples.sln, which features all of the codegens.

Use is as easy as changing the “Build Action” to “Content” in file properties and typing in the desired codegen name (as listed above) in the “Custom Tool” field.

Background

Much of the IDE integration details were covered by BaseCodeGeneratorWithSite posted back on gotdotnet.com.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

cminusminus

Web Developer

United States United States

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web02 | 2.5.120517.1 | Last Updated 26 Sep 2004
Article Copyright 2004 by cminusminus
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid