Skip to content

Releases: ltrzesniewski/RazorBlade

v0.11.0

13 Nov 12:56

Choose a tag to compare

  • Compatibility with the .NET 10 SDK:
    • Removed the [ConditionalOnAsync] feature (it depended on CS1998 which was removed in Roslyn v5). This was necessary, otherwise RazorBlade would generate unexpected [Obsolete] attributes.
  • Optimize internals

v0.10.0

22 Jun 14:47

Choose a tag to compare

  • Added support for the @typeparam directive (#22)

v0.9.0

31 Mar 21:18

Choose a tag to compare

  • Added support for _ViewImports.cshtml files (#18)
  • Added HtmlTemplateWithLayout<TLayout> base class to easily define layouts to use

These two features can be used together to define a default layout for templates in a given directory.

v0.8.0

01 Feb 20:20

Choose a tag to compare

  • The generated output is now sent directly to the provided TextWriter (without additional buffering) when no layout is used (#13).
    This reverts a change introduced in v0.5.0.
  • Added accessibility settings (#19):
    • A RazorBladeDefaultAccessibility MSBuild property which sets the default accessibility: internal (default) or public
    • An Accessibility metadata item on RazorBlade MSBuild items which lets you configure the accessibility per template

Warning

Breaking change: the Layout property is now read-only. To provide a layout instance, override the CreateLayout method.

v0.7.0

11 Dec 22:07

Choose a tag to compare

  • Added warning when using RazorBlade in an ASP.NET project (#14, #15)
  • Added PushWriter/PopWriter methods in RazorTemplate
  • Added support for templated delegates (#17)
  • Fixed Visual Studio removing newly added .cshtml files (#16)

v0.6.0

07 Apr 15:19

Choose a tag to compare

  • Added a RazorTemplate.FlushAsync method which writes the buffered content to the provided TextWriter and flushes the writer. This may be useful when rendering a template to a stream. See #13.

v0.5.0

02 Dec 18:09

Choose a tag to compare

  • Added support for layout pages and sections in HTML templates:
    Write a layout with @inherits RazorBlade.HtmlLayout, and specify the layout to use in a page with:
      @{
          Layout = new LayoutToUse();
      }
  • Used SearchValues<char> in .NET 8 for HTML escaping

v0.4.4

17 Sep 19:27

Choose a tag to compare

  • Don't forward constructors from the base type when:
    • A constructor with a matching signature is defined in the template
    • They have a parameter type which is not accessible
  • Make more members of RazorTemplate virtual
  • Raise an error when tag helper directives are used (#8)

v0.4.3

03 Apr 20:55

Choose a tag to compare

v0.4.2

07 Jan 13:14

Choose a tag to compare

  • Fixed a build failure for targets below net5.0 (#5)