Search code examples
c#.netwindows-store-appsappdomain.net-assembly

Is there an equivalent of AppDomain.AssemblyResolve in windows store apps?


I want to attach to the AppDomain.AssemblyResolve event in a "Windows Store" App. But AppDomain doesn't exist.

Is there an alternative way to get the same functionality?


Solution

  • The concept of DLLs laying around in unpredictable places is an iffy one. Sure, AssemblyResolve can deal with this but accidents happen all the time. And they are without the doubt one of the worst kind, DLL Hell is a usability nightmare that gives the victim no decent shot at getting the problem fixed.

    WinRT was designed to eliminate such kind of chronic Windows usability problems at its core. A Windows Store app must be packaged, all of the executable files that the app needs must be shipped together in a single downloadable file from the store. It thus never makes any sense to try to find a DLL at runtime, it is always part of the package and found in a predictable location. Accordingly, the AssemblyResolve event was removed from the reference assembly, it no longer serves any purpose.