0

I recently discovered memory leaks in our Silverlight application and I have managed to find the source - Context Menu. From what I have searched this is a known issue and there are patches available to fix this. I downloaded the Silverlight ToolKit Source Code and made changes to the class I was having issues with and copied the new DLL to the Silverlight5.0 folder in program files but now I am get XAML Parse Exception errors. I understand this is due to one library being from a different source.

But how do i fix it? I have tried changing references but that didn't help. I tried going back by re-installing Silverlight 5 toolkit but I still get the error.

I haven't found a proper article yet on how to edit and use Silverlight toolkit source code.

Abhi.Net
  • 722
  • 3
  • 11
  • 37

2 Answers2

1

why dont you just add 'Silverlight ToolKit Source Code' as another project in your solution and link it to your main project by reference ? parse exception can occur by you messing something up or the toolkit may be a bit buggy too but with attached toolkit as a project you can edit and try easily, quickly and you will not be influencing other apps using silverlight

frno
  • 1,064
  • 11
  • 24
  • I actually thought of doing this but I am sure there is a better option. – Abhi.Net Nov 21 '13 at 22:55
  • we are always doing it this way, you can edit many things then and it's project-specific which is great .. and it also provides you now with a best option to actually find the real problem inside toolkit – frno Nov 21 '13 at 22:56
  • perhaps your reference to old DLL (silverlight) is not working any more once you replaced it ... check references folder for warnings, otherwise you have to give us more if you wanna help, some real code where it actually fails ... (still consider adding project and taking a look then .. ) – frno Nov 21 '13 at 23:00
  • I have tried replacing all the references but that didn't help. The program crashes while loading silver light with an Error 'The type 'TimeUpDown' was not found. Also it doesn't tell where it crashed. I get "No Source Available' screen. I have added the projects to my solution but I need to updated all the references now. This is only to find the cause, In the end I'd still like to use the libraries – Abhi.Net Nov 21 '13 at 23:11
  • well you are using the libraries as the added project is built into dll and added to your bin folder then .. but try to start where it tells you to start, why is TimeUpDown not found ? does the toolkit project build ok ? – frno Nov 21 '13 at 23:22
1

I had the same problem. I think you didn't copy all used *.dll from the new built toolkit solution into your working project. I mean, you have to check all references of your working project, all references depending on the toolkit solution have to be renewed to your newly built toolkit project.

The problem is that there are some *.dll's which are linked to each other, when you replace only one of them, the compiler can't ind the other one.

  1. Build entire toolkit solution
  2. Delete old references in your working project
  3. Place all used *.dll's from the toolkit solution into your project
  4. Add new references
  5. Build