Deploying custom controls that use teamfoundation assemblies

A question was raised in forums on how to deploy custom controls that refer to team foundation assemblies. Problem is how the deployed dlls will find the TFS dlls. Marcel showed how to use AssemblyResolve event of appdomain to programmatically specify TFS assemblies here: https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=851060&SiteID=1 . Tim's blog has detailed code to achieve the same at: https://blogs.msdn.com/hippietim/archive/2006/03/24/560010.aspx