Starting a debugging session in Silverlight takes a lot of time

In my application, SL4 LOB Ive probably hit F5 1000x and more without a problem. Suddenly, now an F5 defeat can take up to 90 seconds before a Startup application event is raised.

Ive tried to clear IE browser cache, it didn't help there.

I created a new navigation application without any code, hit F5, started right away, great. Then I started to add the same assembly references from my SL4 LOB application to a newly created navigation application. After each link added, I would hit F5 so that the application starts immediately; so far so good.

Alas, I finally came to the System.Windows.Controls.Data.Toolkit.dll file, which caused the same behavior with my original SL4 LOB application. I deleted the link from the navigation application and it will start again immediately. Its only 33kb, so I can not say that I have problems with the character cache.

Has anyone else seen this weird behavior? Any understanding would be greatly appreciated.

+4
source share
1 answer

The small size of your application does not really matter for how quickly debugging sessions start. Slowdown will be caused by a large number of dependencies in your application.

You have removed the only link that has greatly improved the situation, and the likelihood that this single DLL probably depends on many other libraries. If you test the process using the Process Explorer tool, you can see exactly which libraries are loading at runtime.

These extraneous dependencies are quite common. The project wizards that you use in Visual Studio will almost always add dependencies to elements that your final application will not use. For example, an XML link is always part of your default project, but you do not always need to use XML. Good practice is to go through and remove these unnecessary dependencies after the initial creation of your project. You can always come back and re-reference them in the future if you need.

+1
source

Source: https://habr.com/ru/post/1339087/


All Articles