none
System.Windows assembly issue.

    Question

  • Hello everyone

    First I want to apologize for being away from the community (here and my blog) for a couple of months or so. I have been very busy, plus the political and financial situation in Greece that tends to spoil all mood for doing anything else but the necessary (at least to me that is). In june anyhow I plan to post 2 samples that I believe you will find interesting.

    Anyway, enough with pre-election announcements :-). I need your aid (not financial one, yet).

    I am building a rather large app and the last couple of weeks I discovered that a part of it that was working property now it does not. More specifically when trying to save an object I get this exception

    

    Looking in the stack trace I see i has to do with a _Changed handler that calls an external library that also references System.Windows.

    I believe it's a version issue. I have implemented in my client project a custom control for an image gallery. In this control I have used WrapPanel from SL Toolkit and I have a feeling that since then the problem started. 

    Has anyone come against a similar problem or has any idea to come over it? For the time beeing I can overcome the problem moving my external code in the client project or any other workaround. But I have to find out what is the issue exactly as I am afraid of future issues that might come up.


    1+1 = 3 for large values of 1

    Friday, May 25, 2012 8:22 AM

Answers

  • As many times in the past, just posting to the forums was enough for me to find the solution :-). These is something magic about this forum I guess.

    The solution was simple after all but hard to find, I must say. I have 2 framework libraries I use (amongst others), one for the client and one for the common projects. In these projects System.Windows from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0 was referenced, but for some reason (I cannot recall where or when I did this, if I did it) Copy Local was false. Setting this to Copy Local true fixed the problem.

    I hope, as always when I answer my own questions, that this post saves time for other people and find it helpful.


    1+1 = 3 for large values of 1

    Friday, May 25, 2012 11:09 AM

All replies

  • Have you recently removed an Extension from this application?

    I've had a couple of instances where I've tried an exension in an application, not liked it, removed the extension and then suffered errors similar to this either at compile time or run time. The process of removing the extension appeared to have removed more references than it should have.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, May 25, 2012 9:11 AM
  • Hi Simon thanks for the reply.

    I don't recall uninstalling or disabling any extensions lately. Also all references are in place. What looks like is that another one than the required version is loaded. Like there is a System.Windows already loaded and one of my libraries requires a different version and fails. It's almost clear to me it's a versioning issue. But I haven't got a clue where to look.


    1+1 = 3 for large values of 1

    Friday, May 25, 2012 9:51 AM
  • As many times in the past, just posting to the forums was enough for me to find the solution :-). These is something magic about this forum I guess.

    The solution was simple after all but hard to find, I must say. I have 2 framework libraries I use (amongst others), one for the client and one for the common projects. In these projects System.Windows from C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0 was referenced, but for some reason (I cannot recall where or when I did this, if I did it) Copy Local was false. Setting this to Copy Local true fixed the problem.

    I hope, as always when I answer my own questions, that this post saves time for other people and find it helpful.


    1+1 = 3 for large values of 1

    Friday, May 25, 2012 11:09 AM