locked
Error message when i enable my extension RRS feed

  • Question

  • I try to create my first extension based on a VSLS extensions cookbook sample. I just begin to create the basic business type extension (one line) describes on page 75. When i want to enable this extension in a lightswitch project (in the project proerties extensions tab), i have the following error "Unable to add a reference to this exetnsion for the foloowing reason: Could not load the extension 'Blank'. Could not find a module definition for extension 'Blank'. The reference to this extension has been removed..."

    Any idea ?

    Thursday, March 17, 2011 4:58 PM

Answers

  • Hi Alain, sorry to hear that you are having trouble with the sample. A couple of quick things you can check:

    1) Ensure that the module name you are using in the BlankModuleLoader.cs at [ModuleDefinitionLoader( and the name defined in the BlankModule.lsml are the same.

    2) start another instance of VS. Under debug options turn off "Just my Code on". Attach to the Vs instance that is running your LightSwitch project. Put a breakpoint in the IEnumerable<Stream> IModuleDefinitionLoader.LoadModelFragments() method in the BlankModuleLoader.cs. Now attempt to load your extension again. If the method is hit what it attempts to load and any errors should be helpful. If it is not hit it is likely the module name issue in #1.

    If either of these don't help please let me know.

    --Bill R

    Thursday, March 17, 2011 11:39 PM
  • Hi Alian,

    Did you start your extension development from the Blank Extension Solution in the same post as the cookbook? http://download.microsoft.com/download/9/6/3/96358FFC-4CB5-4E7E-967B-E5738000672D/BlankExtension.zip 

    The cookbook walkthough is written as if the user as started from that solution and not from scratch.

    Thanks!

     

    Friday, March 18, 2011 8:27 AM

All replies

  • Hi Alain, sorry to hear that you are having trouble with the sample. A couple of quick things you can check:

    1) Ensure that the module name you are using in the BlankModuleLoader.cs at [ModuleDefinitionLoader( and the name defined in the BlankModule.lsml are the same.

    2) start another instance of VS. Under debug options turn off "Just my Code on". Attach to the Vs instance that is running your LightSwitch project. Put a breakpoint in the IEnumerable<Stream> IModuleDefinitionLoader.LoadModelFragments() method in the BlankModuleLoader.cs. Now attempt to load your extension again. If the method is hit what it attempts to load and any errors should be helpful. If it is not hit it is likely the module name issue in #1.

    If either of these don't help please let me know.

    --Bill R

    Thursday, March 17, 2011 11:39 PM
  • Thank you Bill,

    I added the line <Module Name="Blank"/> in the BlankModule.lsml and that works now.

    I think there is a mistake in the cookbook because this step is not describe for a business type extension. The doc just talks about the BlankPresentation.lsml.

    Regards,

    Friday, March 18, 2011 7:50 AM
  • Hi Alian,

    Did you start your extension development from the Blank Extension Solution in the same post as the cookbook? http://download.microsoft.com/download/9/6/3/96358FFC-4CB5-4E7E-967B-E5738000672D/BlankExtension.zip 

    The cookbook walkthough is written as if the user as started from that solution and not from scratch.

    Thanks!

     

    Friday, March 18, 2011 8:27 AM