2007-11-23

msbuild shenanigans

Bit of a pain this.

I want to be able to create a set of custom msbuild build tasks that:
  1. is compiled as part of my solution (so it's up-to-date)
  2. is referenced by the setup project (the last project to build)
  3. generates a set of scripts from templates and zips them up
  4. publishes the zip file and the installer to a predetermined place
  5. I can use it when I'm working in Visual Studio

Instead its looking like I have to:
  1. compile the tasks independently of my solution
  2. create a new (and useless) project dependent on the setup project to host the tasks
  3. etc etc
Surely there's something wrong here?

Point 2 gives problems because setup projects simply aren't msbuild compatible!

Point 1 I hope I can improve on - my task is attached to the project that builds the assembly and doesn't build because the assembly is in use (by msbuild itself).

Not that unreasonable I suppose but I'd have liked msbuild to be smart enough to realise it's using the assembly its about to build and defer loading it since its only used in the AfterBuild standard target!

Anyone watching with any clues? If not, back to RTFM again.

No comments: