Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Code Generation tools complementing generics

0.00/5 (No votes)
25 Sep 2004 1  
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