Nancy Self Host blank response with Razor view
I'm trying to get self-hosted Nancy to return a razor view and I can't get it to work.  The sample in the Nancy source code uses a web project, but the [page they have][1] doesn't say this is required.  I've tried specifying the config sections but again they say "*This step is totally optional*" (italics are theirs).  Tracing through the source it doesn't look like razor is a valid view engine, but I don't see where I can add it either in the config or in my own NancyModule...  Any help would be appreciated.

![View Engines][2]

When I finally figured out they were looking in the views folder, it seems that the cshtml is a supported extension, but the DefaultViewFactory doesn't have it associated with a view engine so I get null:

![enter image description here][3]

My code:

    public Module1()
    {
    	Get["/me"] = parms =>
    	{
    		return View["Static.html"]; // WORKS!
    	};
    	Get["/you"] = parms =>
    	{
    		dynamic model = new ExpandoObject();
    		//return View["~/Static.cshtml", model];
    		//return View["/Static.cshtml", model];
    		return View["Static.cshtml", model]; // blank page, no error or anything
    	};
    }

Static.cshtml is just an html page that says "Hello, world!"


  [1]: https://github.com/Mpdreamz/Nancy/wiki/Razor-View-Engine
  [2]: http://i.stack.imgur.com/83hgD.png
  [3]: http://i.stack.imgur.com/nGf2k.png

Nancy Self Host blank response with Razor view
===

I'm trying to get self-hosted Nancy to return a razor view and I can't get it to work.  The sample in the Nancy source code uses a web project, but the [page they have][1] doesn't say this is required.  I've tried specifying the config sections but again they say "*This step is totally optional*" (italics are theirs).  Tracing through the source it doesn't look like razor is a valid view engine, but I don't see where I can add it either in the config or in my own NancyModule...  Any help would be appreciated.

![View Engines][2]

When I finally figured out they were looking in the views folder, it seems that the cshtml is a supported extension, but the DefaultViewFactory doesn't have it associated with a view engine so I get null:

![enter image description here][3]

My code:

    public Module1()
    {
    	Get["/me"] = parms =>
    	{
    		return View["Static.html"]; // WORKS!
    	};
    	Get["/you"] = parms =>
    	{
    		dynamic model = new ExpandoObject();
    		//return View["~/Static.cshtml", model];
    		//return View["/Static.cshtml", model];
    		return View["Static.cshtml", model]; // blank page, no error or anything
    	};
    }

Static.cshtml is just an html page that says "Hello, world!"


  [1]: https://github.com/Mpdreamz/Nancy/wiki/Razor-View-Engine
  [2]: http://i.stack.imgur.com/83hgD.png
  [3]: http://i.stack.imgur.com/nGf2k.png
