I have a C# application (using the legacy .NET framework, not the new .NET Core).
It handles the AppDomain.CurrentDomain.AssemblyResolve event. When I debugged the application, I saw that the event in question was called needlessly for a total of 16 times, for three separate DLLs that do not exist:
en-US\A.resources.dll x2
en\A.resources.dll x2
en-US\B.resources.dll x4
en\B.resources.dll x4
en-US\C.resources.dll x2
en\C.resources.dll x2
As you can see above, each DLL is searched for multiple times. For each DLL (A, B and C), the public key tokens are the same.
Why are these calls being made? I removed the event handler so that it doesn't get called, but I am interested in understanding why the runtime thinks that these resource DLLs should exist in the first place.
How can I can tell the runtime that these DLLs don't exist and should not be searched for?
Note: The application exe does not have any embedded resources.