<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>RazorEngine</title><link>http://razorengine.codeplex.com/project/feeds/rss</link><description>A templating engine built upon Microsoft&amp;#39;s Razor parsing technology.  The RazorEngine allows you to use Razor syntax to build robust templates.  Currently we have integrated the vanilla Html &amp;#43; Code support, but we hope to support other markup languages in future.</description><item><title>New Comment on "Building Custom Base Templates"</title><link>https://razorengine.codeplex.com/wikipage?title=Building Custom Base Templates&amp;ANCHOR#C27344</link><description>The Razor.SetTemplateBase&amp;#40;&amp;#41; method no longer seem to exist&amp;#63;</description><author>xps</author><pubDate>Tue, 30 Apr 2013 02:23:29 GMT</pubDate><guid isPermaLink="false">New Comment on "Building Custom Base Templates" 20130430022329A</guid></item><item><title>New Post: 'object' does not contain a definition for 'Header'</title><link>http://razorengine.codeplex.com/discussions/439936</link><description>&lt;div style="line-height: normal;"&gt;Okay, wow, I feel dumb... My model class was private. Making it public fixed my issue.&lt;br /&gt;
&lt;/div&gt;</description><author>DeeboSan</author><pubDate>Thu, 11 Apr 2013 14:00:26 GMT</pubDate><guid isPermaLink="false">New Post: 'object' does not contain a definition for 'Header' 20130411020026P</guid></item><item><title>New Post: 'object' does not contain a definition for 'Header'</title><link>http://razorengine.codeplex.com/discussions/439936</link><description>&lt;div style="line-height: normal;"&gt;Hello,&lt;br /&gt;
&lt;br /&gt;
I'm getting this error when parsing my template even though my model object does have the Header property on it. The odd thing is if I use and anonymous type it works fine. Any ideas how I can fix this? I'm using .NET 4.0.&lt;br /&gt;
&lt;br /&gt;
FAILS&lt;br /&gt;
string body = Razor.Parse&amp;lt;EmailBodyModel&amp;gt;(template, model);&lt;br /&gt;
&lt;br /&gt;
WORKS&lt;br /&gt;
string body = Razor.Parse(template, new { Header = &amp;quot;xxx&amp;quot;} );&lt;br /&gt;
&lt;br /&gt;
I came accross the discussion below but that appears to be the opposite issue that I have.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://razorengine.codeplex.com/discussions/248593" rel="nofollow"&gt;http://razorengine.codeplex.com/discussions/248593&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;/div&gt;</description><author>DeeboSan</author><pubDate>Thu, 11 Apr 2013 13:56:37 GMT</pubDate><guid isPermaLink="false">New Post: 'object' does not contain a definition for 'Header' 20130411015637P</guid></item><item><title>Created Issue: RazorEngine and specials characters [910]</title><link>http://razorengine.codeplex.com/workitem/910</link><description>Hello there,&lt;br /&gt;&lt;br /&gt;I&amp;#39;m using your project in an application where my users are able to generate bunch of code through an user-friendly GUI. Even it&amp;#39;s work really fine, I just got a little &amp;#34;bug&amp;#34; &amp;#40;well, I know it&amp;#39;s not a real bug&amp;#41; with specials characters like thoses ones &amp;#58; &amp;#39; &amp;#34; &amp;#60; &amp;#62; &amp;#35; etc. Thoses characters are interpreted like in HTML-code &amp;#40;&amp;#38;lt&amp;#59; &amp;#38;gt&amp;#59; etc.&amp;#41; like form, however it&amp;#39;s not an awaited behavior.&lt;br /&gt;&lt;br /&gt;So, here&amp;#39;s my question &amp;#58; is there a way inside RazorEngine to disable this behavior, or should I handle with a method it in my template &amp;#63;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks for reading. Please excuse me for potential english mistakes.&lt;br /&gt;</description><author>Daimakaicho</author><pubDate>Wed, 20 Mar 2013 16:02:46 GMT</pubDate><guid isPermaLink="false">Created Issue: RazorEngine and specials characters [910] 20130320040246P</guid></item><item><title>New Post: Performance Issue when using RazorEngine.Razor.SetTemplateService</title><link>http://razorengine.codeplex.com/discussions/436068</link><description>&lt;div style="line-height: normal;"&gt;I found the solution, I just moved the code that sets the template service to App_Start in global.asax and now everything works great :)&lt;br /&gt;
&lt;/div&gt;</description><author>robi2</author><pubDate>Mon, 11 Mar 2013 12:25:44 GMT</pubDate><guid isPermaLink="false">New Post: Performance Issue when using RazorEngine.Razor.SetTemplateService 20130311122544P</guid></item><item><title>New Post: Performance Issue when using RazorEngine.Razor.SetTemplateService</title><link>http://razorengine.codeplex.com/discussions/436068</link><description>&lt;div style="line-height: normal;"&gt;Hi,&lt;br /&gt;
&lt;br /&gt;
I noticed that if I use a base template for my razor views, the views don't get cached and are always begin parsed from scratch.&lt;br /&gt;
&lt;br /&gt;
This is the code i am using:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;// Set razor engine base template
                    var config = new RazorEngine.Configuration.TemplateServiceConfiguration
                    {
                        BaseTemplateType = typeof(MyTemplateBase&amp;lt;&amp;gt;)
                    };

                    using (var service = new TemplateService(config))
                    {
                        RazorEngine.Razor.SetTemplateService(service);
                        // Parse the template and also save it to cache
                        m_content.Text = RazorEngine.Razor.Parse(myTemplate, myModel, myCacheName);
                    }&lt;/code&gt;&lt;/pre&gt;

This code runs on every request, and I think that is the problem.&lt;br /&gt;
&lt;br /&gt;
Can someone point me in the right direction?&lt;br /&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Robert&lt;br /&gt;
&lt;/div&gt;</description><author>robi2</author><pubDate>Sun, 10 Mar 2013 18:59:47 GMT</pubDate><guid isPermaLink="false">New Post: Performance Issue when using RazorEngine.Razor.SetTemplateService 20130310065947P</guid></item><item><title>New Post: ArgumentNullException when using Assembly.LoadFrom</title><link>http://razorengine.codeplex.com/discussions/270474</link><description>&lt;div style="line-height: normal;"&gt;I debugged the code and found that the issue is the RazorEngine is trying to load itself when compile the template but can't find that in the loaded assemblies. So I fixed this problem by install RazorEngine dll in the GAC using .NET Framewok 4 tool with the following command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Install RazorEngine to GAC 4.0&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\NETFX 4.0 Tools\x64\gacutil&amp;quot; /f /i RazorEngine.dll&lt;br /&gt;
&lt;/div&gt;</description><author>mrmohsoft</author><pubDate>Thu, 28 Feb 2013 11:46:38 GMT</pubDate><guid isPermaLink="false">New Post: ArgumentNullException when using Assembly.LoadFrom 20130228114638A</guid></item><item><title>New Post: Do I have to use dynamic models?</title><link>http://razorengine.codeplex.com/discussions/433799</link><description>&lt;div style="line-height: normal;"&gt;Is it necessary to use dynamic models?&lt;br /&gt;
&lt;br /&gt;
I created a class &amp;quot;SampleModelClass&amp;quot; inheriting from abstract class ModelClassBase. I defined properties SampleModelClass.Firstname and SampleModelClass.Lastname. &lt;br /&gt;
When calling Razor.Parse&amp;lt;SampleModelClass&amp;gt;(templateContent, sampleModel); I get an exception telling me that Firstname is not found in class &amp;quot;ModelClassBase&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
I don't understand why RazorEngine wants to use ModelClassBase? If I use a dynamic model (new {Firstname = &amp;quot;Foo&amp;quot;, Lastname = &amp;quot;Bar&amp;quot;;) it works fine.&lt;br /&gt;
&lt;/div&gt;</description><author>tojak</author><pubDate>Wed, 20 Feb 2013 12:57:39 GMT</pubDate><guid isPermaLink="false">New Post: Do I have to use dynamic models? 20130220125739P</guid></item><item><title>New Post: RazorEngine and shared @helpers</title><link>http://razorengine.codeplex.com/discussions/431620</link><description>&lt;div style="line-height: normal;"&gt;&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;How do i use a shared helper within a razor view that's compiled by RazorEngine? i have a helper located in App_Code that contains some common markup, but when i call the helper i get a string representation, not raw html.&lt;/p&gt;
&lt;p&gt;thanks&lt;/p&gt;
&lt;/div&gt;</description><author>shearer3000</author><pubDate>Fri, 01 Feb 2013 02:27:01 GMT</pubDate><guid isPermaLink="false">New Post: RazorEngine and shared @helpers 20130201022701A</guid></item><item><title>New Post: ArgumentNullException when using Assembly.LoadFrom</title><link>http://razorengine.codeplex.com/discussions/270474</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Is this problem officially fixed? or do we have go with the work around for now?&lt;/p&gt;
&lt;/div&gt;</description><author>kingseaeast</author><pubDate>Mon, 21 Jan 2013 23:20:16 GMT</pubDate><guid isPermaLink="false">New Post: ArgumentNullException when using Assembly.LoadFrom 20130121112016P</guid></item><item><title>New Post: ArgumentNullException when using Assembly.LoadFrom</title><link>http://razorengine.codeplex.com/discussions/270474</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Here's what fixed this problem for me. I had to help the runtime load the missing assemblies, so I used the AssemblyResolve event of the current AppDomain and manually loaded the missed assemblies:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;        &lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; RenderText&amp;lt;T&amp;gt;(&lt;span style="color:blue"&gt;string&lt;/span&gt; templateText, T data)
        {
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
            &lt;span style="color:blue"&gt;try&lt;/span&gt; {
                &lt;span style="color:blue"&gt;return&lt;/span&gt; Razor.Parse(templateText, data);
            } &lt;span style="color:blue"&gt;finally&lt;/span&gt; {
                AppDomain.CurrentDomain.AssemblyResolve -= CurrentDomain_AssemblyResolve;
            }
        }

        &lt;span style="color:blue"&gt;private&lt;/span&gt; Assembly CurrentDomain_AssemblyResolve(&lt;span style="color:blue"&gt;object&lt;/span&gt; sender, ResolveEventArgs args) {
            &lt;span style="color:blue"&gt;return&lt;/span&gt; Assembly.Load(args.Name);
        }
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For me this error was&amp;nbsp;happening in a custom MSBuild task that I wrote using RazorEngine to create a report.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;</description><author>sergiopereira</author><pubDate>Thu, 10 Jan 2013 18:42:19 GMT</pubDate><guid isPermaLink="false">New Post: ArgumentNullException when using Assembly.LoadFrom 20130110064219P</guid></item><item><title>Updated Wiki: Home</title><link>http://razorengine.codeplex.com/wikipage?version=25</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;&lt;strong&gt;RazorEngine has been moved to Github&amp;nbsp;&lt;/strong&gt;&lt;/h1&gt;
&lt;h1&gt;&lt;strong&gt;&lt;a href="http://github.com/Antaris/RazorEngine"&gt;http://github.com/Antaris/RazorEngine&lt;/a&gt;&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Update - An early look at RazorEngine v3&lt;/strong&gt;&lt;br&gt;
New blog post - &lt;a href="http://www.fidelitydesign.net/?p=473"&gt;http://www.fidelitydesign.net/?p=473&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
A templating engine built upon Microsoft's Razor parsing technology. The RazorEngine allows you to use Razor syntax to build robust templates. Currently we have integrated the vanilla Html &amp;#43; Code support, but we hope to support other markup languages in future.&lt;br&gt;
&lt;br&gt;
Using the templating engine couldn't be easier, using a simple syntax, we can do the following:&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;  &lt;span style="color:blue"&gt;string&lt;/span&gt; template = &lt;span style="color:#a31515"&gt;&amp;quot;Hello @Model.Name! Welcome to Razor!&amp;quot;&lt;/span&gt;;
  &lt;span style="color:blue"&gt;string&lt;/span&gt; result = Razor.Parse(template, &lt;span style="color:blue"&gt;new&lt;/span&gt; { Name = &lt;span style="color:#a31515"&gt;&amp;quot;World&amp;quot;&lt;/span&gt; });
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
The templating engine supports strict and anonymous types, as well as customised base templates, for instance:&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;  Razor.SetTemplateBase(&lt;span style="color:blue"&gt;typeof&lt;/span&gt;(HtmlTemplateBase&amp;lt;&amp;gt;));
  
  &lt;span style="color:blue"&gt;string&lt;/span&gt; template = 
  &lt;span style="color:#a31515"&gt;@&amp;quot;&amp;lt;html&amp;gt;
      &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Hello @Model.Name&amp;lt;/title&amp;gt;
      &amp;lt;/head&amp;gt;
      &amp;lt;body&amp;gt;
        Email: @Html.TextBoxFor(m =&amp;gt; m.Email)
      &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;;
    
  &lt;span style="color:blue"&gt;var&lt;/span&gt; model = &lt;span style="color:blue"&gt;new&lt;/span&gt; PageModel { Name = &lt;span style="color:#a31515"&gt;&amp;quot;World&amp;quot;&lt;/span&gt;, Email = &lt;span style="color:#a31515"&gt;&amp;quot;someone@somewhere.com&amp;quot;&lt;/span&gt; };
  &lt;span style="color:blue"&gt;string&lt;/span&gt; result = Razor.Parse(template, model);
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;NuGet Distribution&lt;/h2&gt;
&lt;p&gt;The Razor Templating Engine is available through Nuget (&lt;a href="/wikipage?title=http%3a%2f%2fnuget.codeplex.com%2f&amp;referringTitle=Home"&gt;http://nuget.codeplex.com/&lt;/a&gt;) in Visual Studio. Simply search for RazorEngine in the package manager, or:&lt;/p&gt;
&lt;pre&gt;    Install-Package RazorEngine&lt;/pre&gt;
&lt;h2&gt;Support Us&lt;/h2&gt;
&lt;p&gt;Donations are always welcome and very appreciated :-), please &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=FWWGE42V4XWUN"&gt;
send donations via Paypal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
Hope you enjoy, feedback is welcome!&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>BuildStarted</author><pubDate>Wed, 09 Jan 2013 17:55:49 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130109055549P</guid></item><item><title>Updated Wiki: Home</title><link>http://razorengine.codeplex.com/wikipage?version=24</link><description>&lt;div class="wikidoc"&gt;
&lt;h1&gt;&lt;strong&gt;RazorEngine has been moved to Github (&lt;a href="http://github.com/Antaris/RazorEngine"&gt;http://github.com/Antaris/RazorEngine&lt;/a&gt;)&lt;/strong&gt;&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;Update - An early look at RazorEngine v3&lt;/strong&gt;&lt;br&gt;
New blog post - &lt;a href="http://www.fidelitydesign.net/?p=473"&gt;http://www.fidelitydesign.net/?p=473&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;strong&gt;Project Description&lt;/strong&gt;&lt;br&gt;
A templating engine built upon Microsoft's Razor parsing technology. The RazorEngine allows you to use Razor syntax to build robust templates. Currently we have integrated the vanilla Html &amp;#43; Code support, but we hope to support other markup languages in future.&lt;br&gt;
&lt;br&gt;
Using the templating engine couldn't be easier, using a simple syntax, we can do the following:&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;  &lt;span style="color:blue"&gt;string&lt;/span&gt; template = &lt;span style="color:#a31515"&gt;&amp;quot;Hello @Model.Name! Welcome to Razor!&amp;quot;&lt;/span&gt;;
  &lt;span style="color:blue"&gt;string&lt;/span&gt; result = Razor.Parse(template, &lt;span style="color:blue"&gt;new&lt;/span&gt; { Name = &lt;span style="color:#a31515"&gt;&amp;quot;World&amp;quot;&lt;/span&gt; });
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
The templating engine supports strict and anonymous types, as well as customised base templates, for instance:&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;  Razor.SetTemplateBase(&lt;span style="color:blue"&gt;typeof&lt;/span&gt;(HtmlTemplateBase&amp;lt;&amp;gt;));
  
  &lt;span style="color:blue"&gt;string&lt;/span&gt; template = 
  &lt;span style="color:#a31515"&gt;@&amp;quot;&amp;lt;html&amp;gt;
      &amp;lt;head&amp;gt;
        &amp;lt;title&amp;gt;Hello @Model.Name&amp;lt;/title&amp;gt;
      &amp;lt;/head&amp;gt;
      &amp;lt;body&amp;gt;
        Email: @Html.TextBoxFor(m =&amp;gt; m.Email)
      &amp;lt;/body&amp;gt;
    &amp;lt;/html&amp;gt;&amp;quot;&lt;/span&gt;;
    
  &lt;span style="color:blue"&gt;var&lt;/span&gt; model = &lt;span style="color:blue"&gt;new&lt;/span&gt; PageModel { Name = &lt;span style="color:#a31515"&gt;&amp;quot;World&amp;quot;&lt;/span&gt;, Email = &lt;span style="color:#a31515"&gt;&amp;quot;someone@somewhere.com&amp;quot;&lt;/span&gt; };
  &lt;span style="color:blue"&gt;string&lt;/span&gt; result = Razor.Parse(template, model);
&lt;/pre&gt;
&lt;/div&gt;
&lt;h2&gt;NuGet Distribution&lt;/h2&gt;
&lt;p&gt;The Razor Templating Engine is available through Nuget (&lt;a href="/wikipage?title=http%3a%2f%2fnuget.codeplex.com%2f&amp;referringTitle=Home"&gt;http://nuget.codeplex.com/&lt;/a&gt;) in Visual Studio. Simply search for RazorEngine in the package manager, or:&lt;/p&gt;
&lt;pre&gt;    Install-Package RazorEngine&lt;/pre&gt;
&lt;h2&gt;Support Us&lt;/h2&gt;
&lt;p&gt;Donations are always welcome and very appreciated :-), please &lt;a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=FWWGE42V4XWUN"&gt;
send donations via Paypal&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br&gt;
Hope you enjoy, feedback is welcome!&lt;/p&gt;
&lt;/div&gt;&lt;div class="ClearBoth"&gt;&lt;/div&gt;</description><author>BuildStarted</author><pubDate>Wed, 09 Jan 2013 17:55:29 GMT</pubDate><guid isPermaLink="false">Updated Wiki: Home 20130109055529P</guid></item><item><title>New Post: ArgumentNullException when using Assembly.LoadFrom</title><link>http://razorengine.codeplex.com/discussions/270474</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;&lt;span&gt;All, I am fac&lt;/span&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;ing the same issue. Did you find a solution?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;AntarisZX&lt;/span&gt;,&lt;/p&gt;
&lt;p&gt;Did you have a version with a fix?&lt;/p&gt;
&lt;/div&gt;</description><author>mrmohsoft</author><pubDate>Tue, 08 Jan 2013 13:24:07 GMT</pubDate><guid isPermaLink="false">New Post: ArgumentNullException when using Assembly.LoadFrom 20130108012407P</guid></item><item><title>New Post: Are there any plans to release this for System.Web.Razor Version 2.0.0.0</title><link>http://razorengine.codeplex.com/discussions/428452</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;First of all, thanks for developing and sharing this package.This has helped me a lot in my applications.&lt;/p&gt;
&lt;p&gt;I am consuming this package in one of my MVC 4 application, and hence facing issues as MVC 4 is referencing System.Web.Razor 2.0.0.0, and RazorEngine package is referencing version 1.0.0.0.. this making the live deployment difficult.&lt;/p&gt;
&lt;p&gt;Could you please let us know if there are any plans to release RazorEngine package for S.W.R. V 2.0.0.0?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Nirman&lt;/p&gt;
&lt;/div&gt;</description><author>nirman1983</author><pubDate>Fri, 04 Jan 2013 04:28:09 GMT</pubDate><guid isPermaLink="false">New Post: Are there any plans to release this for System.Web.Razor Version 2.0.0.0 20130104042809A</guid></item><item><title>New Post: foreach with a single item</title><link>http://razorengine.codeplex.com/discussions/406301</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;When iterating an expando object with a Razor foreach, I receive the &amp;quot;'System.Collections.Generic.KeyValuePair&amp;lt;string,object&amp;gt;'&amp;nbsp;does not contain a definition for ...&amp;quot; error. &amp;nbsp;This only happens when there is a single object in the
 array. &amp;nbsp;As soon as there is more than object in the array, it works.&lt;/p&gt;
&lt;p&gt;Is there a&amp;nbsp;workaround&amp;nbsp;for this?&lt;/p&gt;
&lt;p&gt;Thank you advance.&lt;/p&gt;
&lt;/div&gt;</description><author>myname182</author><pubDate>Mon, 10 Dec 2012 20:38:21 GMT</pubDate><guid isPermaLink="false">New Post: foreach with a single item 20121210083821P</guid></item><item><title>Commented Issue: .NET 4.5 / MVC4 compatibility. Method not found exception [591]</title><link>http://razorengine.codeplex.com/workitem/591</link><description>&amp;#60;p&amp;#62;I have Windows 7 64 bit, .NET 4.5 &amp;#40;preview&amp;#41; installed and ASP.NET MVC 4 &amp;#40;preview&amp;#41; installed.&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;Got following exception&amp;#58; Method not found&amp;#58; System.Collections.Generic.Dictionary&amp;#96;2&amp;#38;lt&amp;#59;System.String,BlockParser&amp;#38;gt&amp;#59; System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords&amp;#40;&amp;#41;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#38;&amp;#35;160&amp;#59;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;Stack Trace&amp;#58;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#123;&amp;#123;&amp;#123;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#91;MissingMethodException&amp;#58; Method not found&amp;#58; &amp;#39;System.Collections.Generic.Dictionary&amp;#96;2&amp;#38;lt&amp;#59;System.String,BlockParser&amp;#38;gt&amp;#59; System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords&amp;#40;&amp;#41;&amp;#39;.&amp;#93;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CSharp.CSharpCodeParser..ctor&amp;#40;&amp;#41; &amp;#43;0&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.RazorEngineHost.DecorateCodeParser&amp;#40;ParserBase incomingCodeParser&amp;#41; &amp;#43;138&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.CreateParser&amp;#40;&amp;#41; &amp;#43;57&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCodeCore&amp;#40;ITextDocument input, String className, String rootNamespace, String sourceFileName, Nullable&amp;#96;1 cancelToken&amp;#41; &amp;#43;80&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCode&amp;#40;TextReader input, String className, String rootNamespace, String sourceFileName, Nullable&amp;#96;1 cancelToken&amp;#41; &amp;#43;126&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCode&amp;#40;TextReader input&amp;#41; &amp;#43;85&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CompilerServiceBase.GetGeneratorResult&amp;#40;RazorEngineHost host, String template&amp;#41; &amp;#43;187&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CompilerServiceBase.GetCodeCompileUnit&amp;#40;String className, String template, ISet&amp;#96;1 namespaceImports, Type templateType, Type modelType&amp;#41; &amp;#43;982&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.DirectCompilerServiceBase.Compile&amp;#40;TypeContext context&amp;#41; &amp;#43;442&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.DirectCompilerServiceBase.CompileType&amp;#40;TypeContext context&amp;#41; &amp;#43;189&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplateType&amp;#40;String razorTemplate, Type modelType&amp;#41; &amp;#43;1526&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplate&amp;#40;String razorTemplate, Type modelType, Object model&amp;#41; &amp;#43;107&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplate&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;98&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.Parse&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;94&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Razor.Parse&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;102&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#125;&amp;#125;&amp;#125;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: mymatemitch ** &lt;p&gt;Check this link http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815 and look at the &amp;quot;Installing ASP.NET MVC 4  breaks ASP.NET MVC 3 RTM applications&amp;quot; section. This problem seems to be caused by VS2012 referencing the wrong versions of certain libraries. In particular, MVC 3 uses Razor 1 and MVC 4 uses Razor 2. If this is not explicitly specified in the csproj, .NET references the latest version by default. I had the same problem and as well as modifying the csproj as per the above link, I also changed System.Web.WebPages, System.Web.Helpers, System.Web.Razor and System.Web.WebPages.Razor to use version 1 in the web.config. Now my MVC 3 site works correctly.&lt;/p&gt;</description><author>mymatemitch</author><pubDate>Mon, 19 Nov 2012 15:36:51 GMT</pubDate><guid isPermaLink="false">Commented Issue: .NET 4.5 / MVC4 compatibility. Method not found exception [591] 20121119033651P</guid></item><item><title>Commented Issue: .NET 4.5 / MVC4 compatibility. Method not found exception [591]</title><link>http://razorengine.codeplex.com/workitem/591</link><description>&amp;#60;p&amp;#62;I have Windows 7 64 bit, .NET 4.5 &amp;#40;preview&amp;#41; installed and ASP.NET MVC 4 &amp;#40;preview&amp;#41; installed.&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;Got following exception&amp;#58; Method not found&amp;#58; System.Collections.Generic.Dictionary&amp;#96;2&amp;#38;lt&amp;#59;System.String,BlockParser&amp;#38;gt&amp;#59; System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords&amp;#40;&amp;#41;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#38;&amp;#35;160&amp;#59;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;Stack Trace&amp;#58;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#123;&amp;#123;&amp;#123;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#91;MissingMethodException&amp;#58; Method not found&amp;#58; &amp;#39;System.Collections.Generic.Dictionary&amp;#96;2&amp;#38;lt&amp;#59;System.String,BlockParser&amp;#38;gt&amp;#59; System.Web.Razor.Parser.CSharpCodeParser.get_RazorKeywords&amp;#40;&amp;#41;&amp;#39;.&amp;#93;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CSharp.CSharpCodeParser..ctor&amp;#40;&amp;#41; &amp;#43;0&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.RazorEngineHost.DecorateCodeParser&amp;#40;ParserBase incomingCodeParser&amp;#41; &amp;#43;138&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.CreateParser&amp;#40;&amp;#41; &amp;#43;57&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCodeCore&amp;#40;ITextDocument input, String className, String rootNamespace, String sourceFileName, Nullable&amp;#96;1 cancelToken&amp;#41; &amp;#43;80&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCode&amp;#40;TextReader input, String className, String rootNamespace, String sourceFileName, Nullable&amp;#96;1 cancelToken&amp;#41; &amp;#43;126&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   System.Web.Razor.RazorTemplateEngine.GenerateCode&amp;#40;TextReader input&amp;#41; &amp;#43;85&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CompilerServiceBase.GetGeneratorResult&amp;#40;RazorEngineHost host, String template&amp;#41; &amp;#43;187&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.CompilerServiceBase.GetCodeCompileUnit&amp;#40;String className, String template, ISet&amp;#96;1 namespaceImports, Type templateType, Type modelType&amp;#41; &amp;#43;982&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.DirectCompilerServiceBase.Compile&amp;#40;TypeContext context&amp;#41; &amp;#43;442&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Compilation.DirectCompilerServiceBase.CompileType&amp;#40;TypeContext context&amp;#41; &amp;#43;189&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplateType&amp;#40;String razorTemplate, Type modelType&amp;#41; &amp;#43;1526&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplate&amp;#40;String razorTemplate, Type modelType, Object model&amp;#41; &amp;#43;107&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.CreateTemplate&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;98&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Templating.TemplateService.Parse&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;94&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;   RazorEngine.Razor.Parse&amp;#40;String razorTemplate, Object model&amp;#41; &amp;#43;102&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;&amp;#60;p&amp;#62;&amp;#125;&amp;#125;&amp;#125;&amp;#60;&amp;#47;p&amp;#62;&lt;br /&gt;Comments: ** Comment from web user: mymatemitch ** &lt;p&gt;Check this link http://www.asp.net/whitepapers/mvc4-release-notes#_Toc303253815 and look at the &amp;quot;Installing ASP.NET MVC 4  breaks ASP.NET MVC 3 RTM applications&amp;quot; section. This problem seems to be caused by VS2012 referencing the wrong versions of certain libraries. In particular, MVC 3 uses Razor 1 and MVC 4 uses Razor 2. If this is not explicitly specified in the csproj, .NET references the latest version by default. I had the same problem and as well as modifying the csproj as per the above link, I also changed System.Web.WebPages, System.Web.Helpers, System.Web.Razor and System.Web.WebPages.Razor to use version 1 in the web.config. Now my MVC 3 site works correctly.&lt;/p&gt;</description><author>mymatemitch</author><pubDate>Mon, 19 Nov 2012 15:35:19 GMT</pubDate><guid isPermaLink="false">Commented Issue: .NET 4.5 / MVC4 compatibility. Method not found exception [591] 20121119033519P</guid></item><item><title>Created Issue: Error when using a base template in the global namespace [850]</title><link>http://razorengine.codeplex.com/workitem/850</link><description>Create a base template in the global namespace, e.g.&lt;br /&gt;&lt;br /&gt;public class MyTemplateBase &amp;#58; TemplateBase &amp;#123;&amp;#125;&lt;br /&gt;&lt;br /&gt;Configure razor engine to use this template&amp;#58;&lt;br /&gt;            Razor.SetTemplateService&amp;#40;new TemplateService&amp;#40;new TemplateServiceConfiguration&amp;#40;&amp;#41;&lt;br /&gt;                &amp;#123;&lt;br /&gt;                    BaseTemplateType &amp;#61; typeof &amp;#40;MyTemplateBase&amp;#38;lt&amp;#59;&amp;#38;gt&amp;#59;&amp;#41;&lt;br /&gt;                &amp;#125;&amp;#41;&amp;#41;&amp;#59;&lt;br /&gt;&lt;br /&gt;No template will be able to be compiled until the base template is put into a specific namespace.&lt;br /&gt;</description><author>IanNewson</author><pubDate>Thu, 25 Oct 2012 10:14:28 GMT</pubDate><guid isPermaLink="false">Created Issue: Error when using a base template in the global namespace [850] 20121025101428A</guid></item><item><title>New Post: Usage of BaseTemplateType</title><link>http://razorengine.codeplex.com/discussions/399363</link><description>&lt;div style="line-height: normal;"&gt;
&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;Can you help me?&lt;br&gt;
I have a BaseTemplateType:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;public&lt;/span&gt; &lt;span style="color:blue"&gt;class&lt;/span&gt; MessageTemplateBase&amp;lt;T&amp;gt; : RazorEngine.Templating.TemplateBase&amp;lt;T&amp;gt;
	{
		&lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; Subject { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }
		&lt;span style="color:blue"&gt;protected&lt;/span&gt; &lt;span style="color:blue"&gt;string&lt;/span&gt; Body { &lt;span style="color:blue"&gt;get&lt;/span&gt;; &lt;span style="color:blue"&gt;set&lt;/span&gt;; }
	}&lt;br&gt;&lt;br&gt; &lt;br&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I can Set this class to razor:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div style="color:black; background-color:white"&gt;
&lt;pre&gt;&lt;span style="color:blue"&gt;var&lt;/span&gt; service = &lt;span style="color:blue"&gt;new&lt;/span&gt; TemplateService(&lt;span style="color:blue"&gt;new&lt;/span&gt; TemplateServiceConfiguration
			{
				BaseTemplateType = &lt;span style="color:blue"&gt;typeof&lt;/span&gt;(MessageTemplateBase&amp;lt;&amp;gt;)
			});
&lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also I have model.&lt;/p&gt;
&lt;p&gt;How I can get parsed Subject amd Body &lt;span id="result_box" lang="en"&gt;&lt;span&gt;separately&lt;/span&gt;&lt;/span&gt;?&lt;/p&gt;
&lt;/div&gt;</description><author>Silvochka</author><pubDate>Mon, 15 Oct 2012 09:32:45 GMT</pubDate><guid isPermaLink="false">New Post: Usage of BaseTemplateType 20121015093245A</guid></item></channel></rss>