Henry 的个人资料Utterances on Software E...照片日志列表 工具 帮助
4月16日

Generating an item group cross product in MSBuild

Isn't it nice when you get a chance to learn a new language that is so totally and completely different from anything else?

Some think MSBuild is make.

Well, sort of.

But, more like NAnt, although I don't know much about that to justify this assumption.

I can't describe the full beauty of MSBuild here, for (1) I still don't know if it has any and (2) it's vast if you look under the covers.

But it's a gym for your brain.

Your best info about MSBuild is "well-known metadata". This should give you a hint where MSBuild is going.

A developer will quickly start writing custom tasks for everything. A database guy will use item groups and metadata instead.

If the only tool you have is a hammer, everything starts looking like a nail.

So, try getting your head around creating a cross-product of two or more item groups using batching.

Find the two solutions here.

Homework: Make it an inner join. Extra points: Make it a natural join.