Debug Silverlight component from MVC application Visual Studio 2010
In my solution I have a MVC pr开发者_StackOverflow中文版oject. Then I added a Silverlight project. When I added the Silverlight project, I set to include it in the existing web application (MVC project).
It added an .aspx
page that contains the Silverlight component. The problem is that I cannot debug into the Silverlight code when I start the ASP.NET MVC application. I set a breakpoint in the Application_Startup
function in the Silverlight code, but it never stops there. On the breakpoint I have a tooltip:
The breakpoint will not currently be hit. No symbols have been loaded for this document
How do I fix this problem?
Which browser are you using? I've had mixed results with debugging Silverlight with anything besides Internet Explorer, so I'm making sure to use Internet Explorer when developing Silverlight applications.
If you're using Internet Explorer, then Evan's solution should work (at least that's what has stopped me some time - Silverlight debugging disabled in the web project).
Also check that your Silverlight application is present in the list located under Web project properties > Silverlight Applications.
I found the problem. The browser was caching the Silverlight application. I solved that with the following code when initializing the Silverlight component:
param name="source" value="ClientBin/form.xap?<%= DateTime.Now.Ticks %>"
精彩评论