locked
Error after conversion to VS 2012 Lightswitch 2.0 RRS feed

  • Question

  • Hi -

    Finally, we have gotten a successful conversion to VS 2012 LS 2 .. yeah!!  We are doing some regression testing to ensure that we are at a known starting point.  Strangest thing is happening. 

    I can successfully:

    • Edit items in a collection
    • Edit data in a single object
    • Delete items from a collection
    • Add one item to a collection with inital count = 0 and save

    I get this error when I try to add an item to a collection with count > 0 and save.  I catch this error in the SaveChanges_ExecuteFailed method in my data service class.

    "Could not load file or assembly 'System.Windows, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e' or one of its dependencies.  The system cannot find the file specified"

    I have spent all morning trying to figure this out so any help would be appreciated.

    This error occurs on my laptop with VS 2010 AND VS 2012 installed, also occurs on my VM with ONLY VS 2012 installed.

    Thanks in advance for the help.


    Emma

    Monday, January 14, 2013 8:31 PM

Answers

  • Hi -

    Thanks so much for the feedback and advice.  Yes, I am always cleaning and reloading the project files and I certainly understand the benefit that they have, thanks so much for the advice.  Even though I cleaned and reloaded I was still having the same error.

    So, I decided to convert the project again to VS 2012.  The first time that I converted the project I did it on a VM with VS 2012 installed.  The second time I did the conversion I did it on my laptop with VS 2010 and VS 2012 installed and the project converted fine and ..... it is working GREAT. I don't have a reason this made a difference but fingers crossed everything will continue to go well.

    Thanks again for the help


    Emma

    • Marked as answer by NendzaE Tuesday, January 15, 2013 8:32 PM
    Tuesday, January 15, 2013 8:32 PM

All replies

  • Have you tried clearing the solutions output files and doing a rebuild of the project.
    Monday, January 14, 2013 9:20 PM
  • Emphasis on clean & rebuild, not just build (even though after a clean a build & rebuild should accomplish the same thing).

    Another trick that I've had to use on occasion (though not for an upgraded project per se), is to unload, then reload the LightSwitch project. This seems to force LightSwitch to regenerated its generated code.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Tuesday, January 15, 2013 10:41 AM
    Moderator
  • Hi -

    Thanks so much for the feedback and advice.  Yes, I am always cleaning and reloading the project files and I certainly understand the benefit that they have, thanks so much for the advice.  Even though I cleaned and reloaded I was still having the same error.

    So, I decided to convert the project again to VS 2012.  The first time that I converted the project I did it on a VM with VS 2012 installed.  The second time I did the conversion I did it on my laptop with VS 2010 and VS 2012 installed and the project converted fine and ..... it is working GREAT. I don't have a reason this made a difference but fingers crossed everything will continue to go well.

    Thanks again for the help


    Emma

    • Marked as answer by NendzaE Tuesday, January 15, 2013 8:32 PM
    Tuesday, January 15, 2013 8:32 PM
  • Can you verify you have Silverlight 5 installed on the machine that you get that exception?

    David Kidder | Senior SDET | Microsoft | LightSwitch

    Monday, January 21, 2013 12:53 PM
    Moderator