Providing or Filtering assemblies when registering areas for an ASP.NET MVC 2.0 application

Posted by HackedByChinese on Stack Overflow See other posts from Stack Overflow or by HackedByChinese
Published on 2010-03-23T01:27:15Z Indexed on 2010/03/23 1:31 UTC
Read the original article Hit count: 473

I have a large application that currently exists as a hybrid of WebForms and MVC 2.0. Startup of my application is dreadful, and the culprit is primarily because of the AreaRegistration.RegisterAllAreas call. More specifically, that it is using the System.Web. Compilation.BuildManager.GetReferencedAssemblies to enumerate all types in assemblies directly referenced by the application and test them to see if they derive from AreaRegistration.

Unfortunately, I have a number of third-party assemblies that happen to be quite extensive, so this initial load can be pretty bad. I'd have much better results if I could tell it which assemblies to look for AreaRegistrations, or even register areas manually for the time being.

I can gather up all the internals of AreaRegistration to create and invoke the registration, but I'm just curious if others have had and worked around this issue.

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about asp.net-mvc-areas