-
Notifications
You must be signed in to change notification settings - Fork 15
Development on a module from a module template up to version 2.12.3
David Schöne edited this page Apr 30, 2019
·
6 revisions
In the current version of BEXIS2 there is a problem if you want to work on a new module and use the module template for it.
The problem is that the view search engine of the MVC framework does not find the views anymore because the structure of the projects has changed.
- Copy the class "CustomViewEngine" from the appendix into the BEXIS2CODE\Console\BExIS.Web.Shell\Helpers directory & paste the class of the solution.
- Open the Global.asax file and add the following lines to the Appliaction_Start().
protected void Application_Start()
{
var tmp = new CustomViewEngine();
foreach (var engine in ViewEngines.Engines)
{
if (engine is RazorViewEngine)
{
((RazorViewEngine)engine).AreaMasterLocationFormats = tmp.AreaMasterLocationFormats;
((RazorViewEngine)engine).AreaPartialViewLocationFormats = tmp.AreaPartialViewLocationFormats;
((RazorViewEngine)engine).AreaViewLocationFormats = tmp.AreaViewLocationFormats;
}
}
app = BExIS.App.Bootstrap.Application.GetInstance(RunStage.Production);
app.Start(WebApiConfig.Register, true);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}-
Start program
-
Now you should do the action and get a view back.

