Domanda

I am examining my application using Process Monitor. (.NET framework 4, WPF app) I am observing that for every dll in my application, it is looking for "mydllname".resources.dll My application has more than 100 dll's. But is has only one language support. And i am not using any Resources,.resx or something like that.

How can i stop that ? or does the .NET framework always looks for .resources.dll for every dll that is referenced. thanks.

È stato utile?

Soluzione

The startup time of every application has been always a thorn for every NET programmer. I think that the check for 'library'.resource.dll is always performed by design so I don't think it's possibile to stop this behavior. But before to worry for this, I think one should question how much time is required by these checks in comparison to the total time required to start the whole project and if there are some steps that can help in reducing startup time.

In your case I will try to create a small startup project with the minimum DLL required to start your first window. This project then will call the other parts on a need to use basis. Difficult to say, but seems improbable that you need a reference to all 100 assemblies directly from your startup project.

However I understand that this could means a big change in your design.
So look also at this drastical solution presented here

EDIT: When I talk about startup time, I mean also the time spent in your initialization code. Here you need a profiler like EQATEQ to check the time passed inside your methods and try to optimize them or move everything in a separate thread

Altri suggerimenti

Try applying the NeutralResourcesLanguage attribute to your assembly. This will stop the standard ResourceManager searching for satellite assemblies if the CurrentUICulture matches the specified neutral resource language.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top