none
Problems updating my extensions to run on 2013 RRS feed

  • Question

  • Hi, so I realise Elyl's Extensions doesn't work on VS2013, you get a bunch of errors when you try and run your VS2013 desktop app if you've got my extension installed, so I'm trying to upgrade it so it works with 2013.

    I've updated all the references in my Extension project to the 2013 ones, the project is building fine, and it actually works in 2013, EXCEPT when the Lightswitch intrinsic extensions are also selected for the project :S

    I know it's probably my extension that's causing the problem, rather than Lightswitch's own intrinsic ones, but I can't work out what's up.

    A few things:

    When I edit any of the lsml files in my extension, I get warnings that it "Could not find schema information for the element 'http://schemas.microsoft.com/LightSwitch/2010/xaml/model:Control.Attributes'" and every other item within that schema, like as if it doesn't know what the http://schemas.microsoft.com/LightSwitch/2010/xaml/model schema is.  I don't remember this being the case in 2012.  Should I be using a different schema?  Why isn't it finding the schema?

    When I run a project which has my (updated) extension, plus the LS intrinsic extensions, I get the following 2 errors pop up from the Silverlight app, one after the other (then it just sticks on the "Loading..." screen indefinitely):
    "Model loading failed.  A model item with Id 'Microsoft.LightSwitch.Extensions:!module' already exists."
    "Object reference not sent to an instance of an object."
    Debugging the extension from within a second instance of VS throws no apparent errors in the extension.

    Anyone have any suggestions on what I'm doing wrong, or where to start looking?

    EDIT: I tell a lie... I didn't have "Just My Code" enabled when debugging, so it didn't catch a few exceptions when debugging the extension in a 2nd instance.  I get multiple exceptions for:

    Cannot find a Resource with the Name/Key ScreenLoadingBackgroundBrush [Line: 25 nbsp; LineNumber=25
      LinePosition=36

    There's no indication in the exception detail as to where this is failing.  I do not have that key mentioned anywhere in my extension code.


    Free Visual Studio LightSwitch extensions: Elyl's Extensions


    • Edited by ElylV Tuesday, April 14, 2015 4:29 PM
    Tuesday, April 14, 2015 4:15 PM

All replies


  • "Model loading failed.  A model item with Id 'Microsoft.LightSwitch.Extensions:!module' already exists."
    "Object reference not sent to an instance of an object."
    Debugging the extension from within a second instance of VS throws no apparent errors in the extension.

    As the error message shows, there is duplicate extensions module, perhaps Beth's upgrading guide will help you, https://social.msdn.microsoft.com/Forums/en-US/4f8f6eed-e4cd-459a-8523-f6021c4df55b/upgrading-lightswitch-extension-projects-to-visual-studio-2013?foru

    Wednesday, April 15, 2015 9:59 AM
  • Thanks for that, it's given me some better insight into what's causing the problem.

    One of the controls in my extension is the LinkedEmailEditor (which just adds a button next to the box which calls a mailto: link of the address in the box).  This control is actually just a wrapper around Lightswitch's own e-mail editor control (which is in the Lightswitch intrinsic extensions).
    I do this by referencing Microsoft.LightSwitch.Extensions.Client, which is in the Lightswitch intrinsic extension's folder (LightSwitch Extensions\Contents\Client\Reference\Microsoft.LightSwitch.Extensions.Client.dll)

    If I remove this control from my extension, it works.  If I have it in there (or even just a reference to the above DLL), then I get the errors I mentioned above.

    So, I guess there's some kind of conflict between me adding that dll reference in my extension, and LightSwitch's intrinsic reference to that dll.  As far as I can tell, they're both the same version.

    Anyone have any ideas on this?  I know I'm perhaps cheating a bit by using Lightswitch's own controls in my control, and not many people do that, but it would be nice to fix it rather than just remove the control from my 2013 extension.


    Free Visual Studio LightSwitch extensions: Elyl's Extensions

    Wednesday, April 15, 2015 1:56 PM