I am trying to use View Engine to return an HTML page in my window application. URL gets called but when i try to return a View, i get ViewNotFoundException error.
In an error message, I cant see the extensions available and locations inspected but i still get an error as Below:
Nancy.RequestExecutionException: Oh noes! ---> Nancy.ViewEngines.ViewNotFoundException: Unable to locate view 'test' Currently available view engine extensions: sshtml,html,htm,cshtml,vbhtml
I have checked the Demo project on git and it works fine but that's a web project whereas mine is window service (i might be missing something). Has anyone tried to implement View Engine in windows service and got it working.
Error is quite self-explanatory but i cant seems to get my head around where the test file should go for it to work.
Edit:
Nancy version: 1.4.2
I tried var foo = typeof(RazorViewEngine); and it does return all the View Engine values with locations inspected and all that.
My Project structure is:
Modules
---- myModule.cs
Views
---- Test.cshtml
views/test is in locations inspected but it looks like, its looking somewhere instead of my structure.
Thanks in advance