GAC assembly as a post build event
With BizTalk server every DLL we use has to be in the GAC.
Much too often, after making a change to such DLL, I forget to GAC it in time before running a test which would, naturally, result in the test failing; in most cases the error is obvious and I simply have to return to the infamous build-gac-restart host cycle before running my test, but every now and then I get thrown by the error and do not realise it is a simple case of me forgetting to GAC an assembly.
To avoid those annoying moments I have developed a habit of adding the command to GAC an assembly to the project's post-build event.
The command required looks like this -
"$(DevEnvDir)..\..\SDK\v2.0\Bin\GacUtil.exe" /i "$(TargetPath)" /f
and it can be used to make sure that on a successful build the assembly generated will be added to the GAC.
Of course this has downsides - it is quite possible that you do not want to GAC on every build; further more - the post-build event is part of the project properties and as such goes into whatever source control you're using - now you have to worry about all those other developers who might get that code and build it - do they want it in the GAC?
Having said all that I find that - for me - having the post build event is usually better than not having it.