From e8ae9fa86bf5d193ad007fbc1df7ea87522a09dc Mon Sep 17 00:00:00 2001 From: dzhenko Date: Wed, 23 Mar 2016 15:18:43 +0200 Subject: [PATCH] Upgraded Single Dynamic content --- .../App_Start/RazorGeneratorMvcStart.cs | 21 +++++++++++++++++ .../SingleDynamicContent.csproj | 23 +++++++++++++++---- .../SingleDynamicContent/app.config | 16 +++++++++++++ .../SingleDynamicContent/packages.config | 9 +++++--- 4 files changed, 62 insertions(+), 7 deletions(-) create mode 100644 SingleDynamicContent/SingleDynamicContent/App_Start/RazorGeneratorMvcStart.cs diff --git a/SingleDynamicContent/SingleDynamicContent/App_Start/RazorGeneratorMvcStart.cs b/SingleDynamicContent/SingleDynamicContent/App_Start/RazorGeneratorMvcStart.cs new file mode 100644 index 00000000..4910b180 --- /dev/null +++ b/SingleDynamicContent/SingleDynamicContent/App_Start/RazorGeneratorMvcStart.cs @@ -0,0 +1,21 @@ +using System.Web; +using System.Web.Mvc; +using System.Web.WebPages; +using RazorGenerator.Mvc; + +[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(SingleDynamicContent.RazorGeneratorMvcStart), "Start")] + +namespace SingleDynamicContent { + public static class RazorGeneratorMvcStart { + public static void Start() { + var engine = new PrecompiledMvcEngine(typeof(RazorGeneratorMvcStart).Assembly) { + UsePhysicalViewsIfNewer = HttpContext.Current.Request.IsLocal + }; + + ViewEngines.Engines.Insert(0, engine); + + // StartPage lookups are done by WebPages. + VirtualPathFactoryManager.RegisterVirtualPathFactory(engine); + } + } +} diff --git a/SingleDynamicContent/SingleDynamicContent/SingleDynamicContent.csproj b/SingleDynamicContent/SingleDynamicContent/SingleDynamicContent.csproj index 9816d193..07f0a134 100644 --- a/SingleDynamicContent/SingleDynamicContent/SingleDynamicContent.csproj +++ b/SingleDynamicContent/SingleDynamicContent/SingleDynamicContent.csproj @@ -45,9 +45,15 @@ ..\packages\Ninject.3.2.2.0\lib\net45-full\Ninject.dll + + ..\packages\Ninject.Web.Common.3.2.3.0\lib\net45-full\Ninject.Web.Common.dll + ..\packages\Sitefinity.RazorEngine.3.0.8.0\lib\net40\RazorEngine.dll + + ..\packages\RazorGenerator.Mvc.2.3.12\lib\net40\RazorGenerator.Mvc.dll + ..\packages\ServiceStack.Signed.4.0.44\lib\net40\ServiceStack.dll @@ -65,6 +71,7 @@ + False ..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll @@ -109,15 +116,19 @@ ..\packages\Telerik.Sitefinity.Core.8.2.5900.0\lib\net40\Telerik.Sitefinity.dll - + False - ..\packages\Telerik.Sitefinity.Feather.Core.StandAlone.1.4.360.0\lib\net45\Telerik.Sitefinity.Frontend.dll + ..\packages\Telerik.Sitefinity.Feather.Core.StandAlone.1.4.460.0\lib\net45\Telerik.Sitefinity.Frontend.dll + + + ..\packages\Telerik.Sitefinity.Feather.Core.StandAlone.1.4.460.0\lib\net45\Telerik.Sitefinity.Frontend.Data.dll ..\packages\Telerik.Sitefinity.Core.8.2.5900.0\lib\net40\Telerik.Sitefinity.Model.dll - - ..\packages\Telerik.Sitefinity.Mvc.1.4.360.0\lib\net45\Telerik.Sitefinity.Mvc.dll + + False + ..\packages\Telerik.Sitefinity.Mvc.1.4.460.0\lib\net45\Telerik.Sitefinity.Mvc.dll ..\packages\Telerik.Sitefinity.Core.8.2.5900.0\lib\net40\Telerik.Sitefinity.Personalization.dll @@ -155,8 +166,12 @@ ..\packages\Telerik.Web.UI.2015.3.930.40\lib\net40\Telerik.Web.UI.Skins.dll + + ..\packages\WebActivatorEx.2.0.3\lib\net40\WebActivatorEx.dll + + diff --git a/SingleDynamicContent/SingleDynamicContent/app.config b/SingleDynamicContent/SingleDynamicContent/app.config index afec2a4a..10ca3b47 100644 --- a/SingleDynamicContent/SingleDynamicContent/app.config +++ b/SingleDynamicContent/SingleDynamicContent/app.config @@ -6,6 +6,22 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SingleDynamicContent/SingleDynamicContent/packages.config b/SingleDynamicContent/SingleDynamicContent/packages.config index 4bc1c8e4..6ff97443 100644 --- a/SingleDynamicContent/SingleDynamicContent/packages.config +++ b/SingleDynamicContent/SingleDynamicContent/packages.config @@ -6,6 +6,8 @@ + + @@ -15,8 +17,9 @@ - - - + + + + \ No newline at end of file