MVC widgets not registering in Sitefinity using Feather

Posted by Community Admin on 04-Aug-2018 16:51

MVC widgets not registering in Sitefinity using Feather

All Replies

Posted by Community Admin on 13-Jan-2015 00:00

Followed the instructions on github.com/.../Create-a-“Hello-World”-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?!

Posted by Community Admin on 11-Aug-2015 00:00
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 ?
Posted by Community Admin on 14-Aug-2015 00:00
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
 
Posted by Community Admin on 17-Aug-2015 00:00

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.


 
 
Posted by Community Admin on 21-Aug-2015 00:00

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.

Posted by Community Admin on 21-Aug-2015 00:00
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.
Posted by Community Admin on 24-Aug-2015 00:00
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
 
Posted by Community Admin on 22-Feb-2016 00:00
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.
Posted by Community Admin on 22-Feb-2016 00:00
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.
Posted by Community Admin on 23-Feb-2017 00:00
I am trying with .Net 4.5.2. But I am seeing the same issue. Do we have any solution for this?
This thread is closed