+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / MVC widgets not registering in Sitefinity using Feather

MVC widgets not registering in Sitefinity using Feather

9 posts, 0 answered
  1. Lucian
    Lucian avatar
    1 posts
    Registered:
    12 Jan 2015
    13 Jan 2015
    Link to this post

    Followed the instructions on https://github.com/Sitefinity/feather/wiki/Create-a-%E2%80%9CHello-World%E2%80%9D-MVC-widget-in-a-separate-assembly with no success. Also, did not change the name of the SitefinityWebApp project.

     

    Is this a known bug with Feather?!

  2. Mick
    Mick avatar
    4 posts
    Registered:
    23 Jul 2015
    11 Aug 2015
    Link to this post
    I have the same issue - created the "Hello World" MVC widget in a separate assembly and the widget is not registering.  Did anyone find a resolution for this ?
  3. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    01 Dec 2016
    14 Aug 2015
    Link to this post
    Hello,

    This functionality is a key component of Project Feather and is working and being used by a vast majority of the people using Feather. However, there are some key things that should be noted in order to make it work.

    1.) Telerik.Sitefinity.Feather.Core nuget package has to be installed in the separate assembly.

    2.) The AssemblyInfo of the separate project has to have the ControllerContainer attribute:

    using Telerik.Sitefinity.Frontend.Mvc.Infrastructure.Controllers.Attributes;
    [assembly: ControllerContainer]

    3.) The folder structure must be correct (Mvc -> Controllers, Models, Views)

    4.) Controller classes must be public and derive from "System.Web.Mvc.Controller"

    5.) The controller must be decorated with the ControllerToolboxItem attribute:

    [ControllerToolboxItem(Name = "HelloWorld", Title = "HelloWorld", SectionName = "MvcWidgets")]

    6.) The views must be set to Build Action Embedded resource (Properties -> Build Action)

    7.) The reference for the external assembly must be set to Copy Local (Properties -> Copy Local -> true). Make sure that it is actually copied when compiling.

    Regards,
    Velizar Bishurov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  4. Mick
    Mick avatar
    4 posts
    Registered:
    23 Jul 2015
    17 Aug 2015 in reply to Velizar Bishurov
    Link to this post

    Many thanks for your help, Velizar. 

    It turns out that the nuget package for Telerik.Sitefinity.Feather.Core  in the separate assembly was a different version to the main web site project.  It's working fine now.


     
     
  5. Mick
    Mick avatar
    4 posts
    Registered:
    23 Jul 2015
    21 Aug 2015 in reply to Velizar Bishurov
    Link to this post

    My mistake, it's still not working.  I have tried all these steps and it still does not register.  The assembly dll existing in the web site bin folder, I used reflector and the views are definately embedded.

     I tried to manually edit the ToolboxesConfig.config file and although it appears, I get an error  - The file '/MVC/Views/Test/Index.cshtml' does not exist.

    Any other ideas would be greatly appreciated.

  6. Mick
    Mick avatar
    4 posts
    Registered:
    23 Jul 2015
    21 Aug 2015
    Link to this post
    If it helps, I'm using .Net 4.6 and when I set the build log to diagnostic, it seems riddled with conflicts between .Net 2 and .Net 4 - I don't know if this matters.
  7. Velizar Bishurov
    Velizar Bishurov avatar
    143 posts
    Registered:
    01 Dec 2016
    24 Aug 2015
    Link to this post
    Hello,

    I would like to note that .Net 4.6 is not currently supported (system requirements) and is not a tested case. Please use .Net 4.5 instead.

    Regards,
    Velizar Bishurov
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  8. Michael
    Michael avatar
    8 posts
    Registered:
    11 Jan 2011
    22 Feb
    Link to this post
    Was this ever resolved?  I appear to be having the exact same issue, all the way through this thread, and I have not found a solution yet.
  9. Michael
    Michael avatar
    8 posts
    Registered:
    11 Jan 2011
    22 Feb in reply to Michael
    Link to this post
    I was able to resolve my issue.  Turns out that I did not have the feather module installed/enabled in the sitefinity project I was trying to add my widget to.
9 posts, 0 answered