views:

1319

answers:

3

I am using VS2010, and Silverlight 4. When I run my code the debugging does not work (I get the above error on my breakpoints.

When I clean my solution a warning comes up saying that the system cannot find the file specified (a project dll). It is looking in the right path (..\debug), but there is no dll present.

I started a new Silverlight 4 project, and get the same error.

Sometime's the debugging does work (I am not sure if/what anything changed, but on one occasion I was surprised that my breakpoints worked. After changing one thing the breakpoints stopped working)

A: 

It sounds like you are either loading the release version of your code or an old version of your code.

If you do a clean and then build does the problem "go away" - at least for a while.

Make sure that when you finish running your application you close the web browser. You might even have to stop the web server that Visual Studio starts for you.

ChrisF
+2  A: 

Make sure you are using Internet Explorer to debug your Silverlight app. Make sure you are using Internet Explorer as your default browser. If you are not debuggin in IE, the IDE will not recognise breakpoints.

Donal
yea, I was using chrome (I think it has worked 'occasionally in chrome). Have not had an issue with Firefox before, will test out firefox later and post the results.When I clean the solution, I still get the warnings about the dll's, but the breakpoint do work.
Grayson Mitchell
I'm still getting this problem after a clean, rebuild and running in IE.
RandomEngy
A: 

I had the same issue. Here's how I eventually got it working:

  • you need a web project to host the silverlight control. just letting it create a test file doesn't seem to work (i.e. you need http://localhost... instead of file://...)
  • when attaching to IE, don't just pick the iexplore.exe that has the title of your application, pick one that has "Silverlight, x86" in the "Type" column.
Mark Heath