Feather MVC Widget - View not being found?

Posted by Community Admin on 05-Aug-2018 14:00

Feather MVC Widget - View not being found?

All Replies

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

Hi all,

 I'm working on a Sitefinity project with Feather installed. I'm attempting to follow the custom widget tutorial but I'm running into an error that I'm not quite sure where to look to fix. 

I've got my widget in a separate class library project within the solution. I've set it up exactly per the tutorial and ensured that it gets built prior to the Sitefinity project. I've added a reference to that class library project to Sitefinity as well. Everything appears to be work because I can see the widget in my Sitefinity backend. However, when I drop the widget onto a page I get an error message saying to check the error logs. So I did, and here is the error I'm seeing: 

 

"The view 'Default' or its master was not found or no view engine supports the searched locations. The following locations were searched:"

 In the view locations I can clearly see the "~/Views/MyWidget/Default.cshtml" listed and I've confirmed that everything is spelled correctly and in the proper place with the class library project. 

I also double checked that Microsoft.AspNet.Razor is installed and that both projects are targeting the same framework. I've tried removing and re-adding the reference, cleaning and rebuilding the solution (and each project individually).

 I'm sure I'm missing something basic here and any help is greatly appreciated. 

 

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

Hello,

When having a Feather widget in separate assembly all resources (views, stylesheets, JavaScript) need to be set to build action - "Embedded resource" (right click the file -> Properties -> Build Action). Otherwise they are not included in the assembly and thus cannot be found.

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 20-Aug-2015 00:00

Thanks Velizar, I missed that step in the instructions! The view is working, but now I'm having other issues.

Posted by Community Admin on 15-Oct-2015 00:00

Even i had the same issue. I tried and even changed the build action to "EmbeddedResource", but i am still getting same log

Posted by Community Admin on 20-Oct-2015 00:00

Hello,

Make sure that you have specified that the external assembly is a ControllerContainer: http://docs.sitefinity.com/feather-create-widgets#create-the-custom-model-the-controller-and-the-view

Furthermore make sure that the Feather version isntalled in the SitefinityWebApp and the external assembly are the same version. You can check the feather version by inspecting the Telerik.Sitefinity.Frontend reference in the project.

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 14-Sep-2016 00:00

Hi Velizar,

 

I've followed every detail of that example you linked, twice. The result is consistent:

```

The view 'Default' or its master was not found or no view engine supports the searched locations. The following locations were searched:

```

 

I've set the view to "Embedded Resource" and I've checked that the Telerik.Sitefinity.Frontend references are the same version.

Posted by Community Admin on 13-Dec-2016 00:00

I'm experiencing the exact same issue.  Interestingly enough, the Widget Designer works as expected (DesignerView.Simple.chtml, as well as the angular controller are loaded).    I can't figure out why the front end view (Default.cshtml) isn't loading the same way!

This thread is closed