Current App is a MVC Core Web app. I am using VS 2017 15.4 on windows 10. I have Docker for windows installed and host is set to Linux.
The web app gets its razor views from the database. I have all of this working by extending the options of the Mvc Razor engine using ViewLocation Formats, Location Expanders, and Virtual Path Provider. The app works locally in debug mode via visual studio. It serves a page where the page, partial views, and layout are retrieved from the database. My ViewImports includes my namespaces for my custom models and helpers. My viewstart sets the respective layout from the database.
When I run the app in release mode, it spins up the docker image, via the compose and docker file. The app runs fine. When I request the page that is from the database, it fails on razor compilation exception, unable to find reference for my model and helpers. I tried adding compiler references via the options of the razor view engine setup in my start up file, but still get the exception. Why would it work in debug mode and not release withing the docker linux hosted container?? Does it have anything do with the content root being set correctly or my options settings in startup? Please help? Need direction if my setup is missing something in order for this to work on a linux host.