I have ASP.NET MVC 5.2.6 project, In short, when I want to publish the website, I do not want to publish the Views as loose *.cshtml
files in the Views
folder, I want to integrate the Views inside a dll.
I found this question, it is talking about compiling the ASP.NET MVC Razor Views, I applied it and it worked for me, and I was able to compile the ASP.NET MVC Razor Views, but I could NOT get rid of them, when I deleted the *.cshtml files, the website is no longer working, that is mean that the views do not go inside a dll.
Here is the Error when I delete the Views folder
which is obviously, say that he could not find the view. Should I write some code to manipulate the Razor search Engine to enforce it to look inside the dll?