Try our conversational search powered by Generative AI!

Addon with zipped content folder and razor views


I have an addon that consists of a couple razor views.

When I zip the views folder up and place it in the modules directory I get the following error on my views:

Compiler Error Message: CS0103: The name 'model' does not exist int he current context

However, if I extract the zip file, my views work.

It would appear that the view engine is not able to read the web.config in the views directory when the files are zipped.  Has anyone else encountered this problem and come up with a solution?

Thanks in advanced!

May 19, 2016 6:09

Do you have module.config file in module direcotry, like (for protected ones) modules/_protected/.../module.config?

Do you have web.config inside root folder of the .zip file?

May 20, 2016 17:19

I'm having exactly the same problem and the answer to both questions asked is yes

Jun 21, 2018 14:37

There is a bug fix for something that sounds like your case, the fix was relesed in pakcage EPiServer.CMS.UI 11.4.1, see

Jun 25, 2018 13:36
* 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.