• Log all assemblies used

    Sometimes it’s quite helpful to know which assembly is currently used by an application.  Microsoft has an example in their MSDN-Article explaining AssemblyName.Version Property. So this article is more a reminder because it’s quite helpful on application initialization to log the assemblies sometimes. But logging should not be done too early, because assemblies are not available as long as they are not used so it would be better to add it at the end of the initialization.

    The logger is log4net but could of course easily be changed.
    Update 07. January 2014: Yesterday evening several Windows Patches have been deployed on our server. Since then one of our vb.net application did not work anymore. It worked fine with .net 4.0 before but now crashes with the following exception: The invoked member is not supported in a dynamic assembly. The reason is found here: http://bloggingabout.net/blogs/vagif/archive/2010/07/02/net-4-0-and-notsupportedexception-complaining-about-dynamic-assemblies.aspx  Strange because the application ran fine so far, but installing patch described in Microsofts KB 2858725 stopped the application from working. So please find below the updated version.


Leave a comment

If you want to share your opinion, leave a comment.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">