Folks, the MSBuild process provides Condition= and #if to provide lots of
control over which files and code fragments are compiled and published for
a given Configuration.

My projects contain increasing numbers of non-cs files like html, css, js,
txt, etc which often need conditional processing, especially the equivalent
of a #if to select fragments of those sorts of files for different
configurations. There's no way to select fragments of arbitrary files with
a #if, so I've been wondering for years about the best way to simulate the
feature.

I can't find any tools to do this, so I *think* that a custom MSBuild Task
might be the way to go. The task could be given some parameters and it
would edit the files and add and remove sections based upon the
configuration before the build starts.

Does anyone think that's a good idea? Or maybe there's a better way.

Cheers,
*Greg Keogh*
-- 
ozdotnet mailing list 
To manage your subscription, access archives: https://codify.mailman3.com/ 

Reply via email to