Friday, 27 June 2008

MSBuild Tasks - DLL or EXE

Quite often I find that I need the reuse the functionality that is in a custom msbuild task within small tool elsewhere. Usually the way round that issue is to refactor the nuts an bolts of the task into another dll, and then referencing this where needed. This is still the best option in my opinion. However this morning we discovered that you put your tasks assembly in exe wrappers also. This allows you to have a static main etc etc to allow to you call the nuts and bolts of the task from, say, the command line. Thanks to colleague Martin for verifying my ad hoc musings on this subject.

No comments: