This project is read-only.

Views search path

Jan 12, 2011 at 10:40 PM
Edited Jan 13, 2011 at 12:25 AM

Hello

I have a project there i don't get the it to load the view right.

Projectname.Framework.Web ->
                                                           -> Folder
                                                                   -> View
                                                                            -> index.spark
                                                                 -> Controllers
                                                                            -> FolderController.cs
                                                          -> WebServer.cs = starting the webserver here 

I have this code in WebServer.cs to start all

      Assembly thisAssembly = typeof (Program).Assembly;

      // create a MVC web server.
      var server = new MvcServer();
      server.ViewEngines.Add(new SparkEngine());
      server.Add(HttpListener.Create(IPAddress.Any, 8080));
      server.Add(new SimpleRouter("/", "/folder/"));

      // Load controllers and embedded views.
      BootStrapper bootStrapper = new BootStrapper(server);
      bootStrapper.LoadEmbeddedViews(thisAssembly);
      bootStrapper.LoadControllers(thisAssembly);

 How can i find the view i would have? I get /folder/index.spark don't exist when i run the code. 

I run the code from another project where my test console are.