First you will need to reference Sharpy.dll from your ASP.NET MVC application. The Sharpy assembly has a dependency on System.ComponentModel.Composition.dll.

Now you will need to add the Sharpy view engine to the list of view engines used by MVC. In the global.asax.cs file add the following line to the ApplicationStart event handler, just after the call to RegisterRoutes_:

ViewEngines.Engines.Add(new SharpyViewEngine()); 

The SharpyViewEngine class is located in the Sharpy.ViewEngine namespace.

That's all you need to get started. The Sharpy view engine will now be used to render any views with the .sharpy extension.

Last edited Feb 14, 2010 at 2:55 PM by JacoPretorius, version 1


No comments yet.