Handle error BuildManager.GetReferencedAssemblies

Unittests fail on the call to BuildManager.GetReferencedAssemblies,
since the BuildManager is supposed to run in the context of an ASP.NET
runtime. So a try catch has been added to logs succes or failure of the
called method.