[MonoDevelop] Custom tools on multiple files

Federico Di Gregorio fog at initd.org
Tue Jan 4 03:51:45 EST 2011


On 04/01/2011 07:43, Michael Hutchinson wrote:
>> I looked into custom tools (like the one defined by the T4 addin) but
>> > the problem is that ISingleFileCustomTool works on the source file and
>> > generates a derived file in the same directory. I need to work on a
>> > series of files (or on a folder) and generate a single file, like:
>> >
>> > xxx/js/jquery.js
>> > xxx/js/jquery.form.js
>> > xxx/js/...
>> >
>> > into:
>> >
>> > xxx/assets.js
>> >
>> > What's the best approach MD-wise?
> I don't think there's any way to adapt "Generator" to this use case -
> we're constrained by maintaining project format compatibility with VS.
> Also, its intended use case is generating source files that can be
> inspected and navigated within the IDE, consumed by code completion,
> etc. - it sounds to me like your use case doesn't really require this,
> and would be better served by a build tsk.
> 
> I would set a custom build action for these files - i.e. an msbuild
> item type - then hook into the MD or msbuild build pipeline to
> "compile" all files with this action. I might even add support for
> additional item metadata that could be used to specify the target
> compiled asset.

Thank you very much for the suggestion. Do you have pointers to
documentation that explains how to do that? Just the name of a file that
implements this in MD would be fine.

federico

-- 
Federico Di Gregorio                                       fog at initd.org
  Gli avvoltoi cinesi si nutrono di arte, ma possono anche mangiare
   i `domani'.                                        -- Haruki Murakami


More information about the Monodevelop-list mailing list