English 中文(简体)
在Silverlight中启动调试会话需要很长时间
原标题:Starting a debugging session in Silverlight takes a very long time

在我的SL4 LOB应用程序中,我可能已经达到F5 1000x或更高,没有任何问题。突然间,现在点击F5可能需要长达90秒的时间才能引发应用程序的启动事件。

我试过清除IE浏览器的缓存,但没有任何帮助。

我创建了一个新的导航应用程序,没有任何代码,点击F5,立即启动,很棒。然后,我开始将SL4 LOB应用程序中的相同程序集引用添加到新创建的导航应用程序中。每次添加引用后,我都会点击F5以确保应用程序能够立即启动;到目前为止还不错。

遗憾的是,我终于使用了System.Windows.Controls.Data.Toolkit.dll,它导致了与我原来的SL4 LOB应用程序相同的行为。我从导航应用程序中删除了引用,它会立即启动。它只有33kb,所以我不能说我的符号缓存有问题。

有其他人见过这种奇怪的行为吗?任何见解都将不胜感激。

问题回答

应用程序的小尺寸对调试会话的启动速度并不重要。速度减慢将由应用程序中的大量依赖项引起。

您确实删除了一个引用,这大大改善了情况,而且这个DLL可能依赖于数十个其他库。如果您使用Process Explorer您可以准确地看到哪些库在运行时加载。

这些无关的依赖关系相当常见。您在Visual Studio中使用的项目向导几乎总是向最终应用程序不会使用的项添加依赖项。例如,XML引用始终是默认项目的一部分,但并不总是需要使用XML。在最初创建项目后,仔细检查并删除这些不必要的依赖关系是一种很好的做法。如果需要的话,你可以随时回去重新参考它们。





相关问题
Silverlight Rich text box control

Our team decided that we need our own custom Rich text box control for Silverlight app we are developing. We looked at existing controls mentioned at A good rich text control for Silverlight but ...

Silverlight ImageBrush not rendering (with Bing Map Control)

I m trying to add an image to a Pushpin instance from the Silverlight Bing Map Control, but I can t seem to get it to render (the pushpin renders fine). This is probably a general WPF question rather ...

Silverlight OpenFileDialog DoEvents equivalent

I m processing large files after they are selected by the user. My code looks like the following: if (FileDialog.ShowDialog() == true) { // process really big file } This freezes up the UI so ...

list of controls with templates in silverlight

Does anyone know where to find a list of controls that you can set the template on in Silverlight? I ve wasted several hours now trying to create control templates only to find that the control doesn ...

Silverlight, Updating the UI during processing

I have a simple silverlight multifile upload application, and i want to provide the user with some feedback, right now its only in a test phase and i dont have the webservice. Somehow i cant get the ...

Silverlight 3 - FindName returns null

This looks a bug to me.. Using Silverlight 3 and i have a user control defined in XAML and trying to access the object during runtime returns a null. <Grid> <common:CommonGridEditPanel x:...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called dates which is populated by a WCF service. The property is an ...

热门标签