Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Episerver addon development with Razor view engine - Can't resolve view


Hi guys,

I'm in the process of developing an Episerver addon. My addon is strucuted like an MVC application and is heavily inspired by the skeleton project at I am using Razor views as they are supposedly supported since version 10.10.0 (I'm specifically at 11.1.0). However, I can't seem to get the addon to resolve my razor views properly. I'm getting the infamous exception: 

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

This is my controller:

        RequiredAccess = EPiServer.Security.AccessLevel.Administer,
        Area = PlugInArea.AdminMenu,
        Url = "/my-module/index",
        DisplayName = "My Module")]
    public class MyModuleController : Controller
        public ActionResult Index()
            return View(new MyModuleViewModel { Text = "World" });

My view is located at ~/Views/MyModule/Index.cshtml and looks like this:

@model MyEpiserverModule.Models.MyModuleViewModel

    Layout = null;


Hello @Model.Text!

My module.config:


Moreover, my module is setup as a Nuget package and this is a snippet of my .nuspec file:


When you install the nuget package to an Episerver project, the zip file is correctly placed in ~/modules/_protected/MyEpiserverModule/ and the web.config.install.xdt makes sure the section of the project's Web.config looks like this:


The zip file seems to contain all necessary files in the correct structure.

Can anyone see what I am missing that's preventing my views from resolving properly? My project can be downloaded at There is a Nuget package located at the project's root. This can be installed to an Alloy project to test the module. It shows up correctly in the "Tools" section of the Episerver admin interface. But when I click on the link to open it, the exception is thrown complaining about the missing view.

Any feedback is greatly appreciated. Thanks for your time.

Feb 19, 2018 12:17

This post may help:

Feb 20, 2018 0:20

Hi David, 

Thanks for your response.

I have looked into the Geta plugin, and while it seems to be a great plugin I would really prefer to utilize the official support for Razor views in my particular case. The release notes does indicate that it is now supported, and the author of the Geta plugin goes a long way in recommending its users to move on to the officially supported approach. 

Feb 20, 2018 12:48

Hi, I just wrote about how to create a plugin using razor views:

The difference in my implementation is that there is no custom initilization modules needed and no custom routes. Maybe my posting helps you if you still have this issue.

Mar 15, 2018 22:23

Thanks for sharing your blog! 

Mar 15, 2018 22:48

There was a bug in CMS Ui which prevents the shell from resolving the paths of Razor views. It will be fixed in the upcoming 11.4.1 release.

Mar 15, 2018 23:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.