Skip to content

Releases: soundaranbu/Razor.Templating.Core

v3.1.0

Choose a tag to compare

@github-actions github-actions released this 22 Feb 17:38
5f984ab

What's Changed

Full Changelog: v3.0.0...v3.1.0

v3.1.0-rc.1

v3.1.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Feb 23:01

What's Changed

Full Changelog: v3.0.0...v3.1.0-rc.1

v3.0.0

Choose a tag to compare

@soundaranbu soundaranbu released this 12 Jan 23:34

Breaking Change

  • Razor Runtime compilation is not a supported scenario anymore as ASP.NET Core has deprecated this feature in favor of build time compilation https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete
  • Due to this, features like these are not possible anymore
    • Render views from absolute path at runtime
    • #26 - Add support for Embedded Resources
    • #76 - Razor View as an input string
  • This is not a breaking change in the library itself but just to flag as some people are using this library along with the runtime compilation feature

What's Changed

Other changes since last release

NuGet Package

Full Changelog: v2.1.0...v3.0.0

v2.1.0

Choose a tag to compare

@soundaranbu soundaranbu released this 14 Oct 21:13

Breaking Change (MVC - Non-Standard Layout Folder only)

An issue was reported where the view discovery related to the layout was not working after updating to this version in MVC application. If the layout file was placed in the non-standard folder apart from ~/Views/Shared/ and the full path of the layout was not specified in the view file, then it would break. The guideline is to use the full path of the layout relative to the project if it is placed in a non-standard location or move the layout to the standard ~/Views/Shared folder

Example: - Works in 2.0.0. But breaks in 2.1.0

Layout: /Views/EmailTemplates/BaseLayout.cshtml

View: /Views/EmailTemplates/SampleEmail.cshtml

@{
    Layout = "EmailTemplates/BaseLayout";
}

Fix:
Use the full path of the layout relative to the project

@{
-    Layout = "EmailTemplates/BaseLayout";
+    Layout = "~/Views/EmailTemplates/BaseLayout.cshtml";
}

or move the layout to the standard ~/Views/Shared folder

Please find more details here

What's Changed

NuGet

https://www.nuget.org/packages/Razor.Templating.Core/2.1.0

Full Changelog: v2.0.0...v2.1.0

v2.1.0-rc.1

v2.1.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@soundaranbu soundaranbu released this 12 Sep 19:38

What's Changed

  • #72 Fixed an issue in the MVC application where views were not being discovered in the same controller’s view location. Now, if the controller is HomeController and the view file Index.cshtml is located under Views/Home/Index.cshtml, the library can render the view from HomeController simply by passing Index as the view name. Previously, it was necessary to pass the full relative URL Views/Home/Index.cshtml. This functionality is available only when IRazorTemplateEngine is utilized through Dependency Injection (DI). For applications that are not MVC-based, this view discovery method will not work, and the library will revert to the default behavior, which requires the full relative path of the view file.
  • #71 Adds support for MVC View localization

NuGet

https://www.nuget.org/packages/Razor.Templating.Core/2.1.0-rc.1

Full Changelog: v2.0.0...v2.1.0-rc.1

v2.0.0

Choose a tag to compare

@soundaranbu soundaranbu released this 18 Apr 08:44

v2.0.0-rc.1

v2.0.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@soundaranbu soundaranbu released this 04 Mar 22:20
d7d0c84

What's Changed

+ Task<(bool ViewExists, string? RenderedView)> TryRenderAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);
+ Task<(bool ViewExists, string? RenderedView)> TryRenderPartialAsync(string viewName, object? viewModel = null, Dictionary<string, object>? viewBagOrViewData = null);

Breaking Change

  • Removed deprecated methods announced in the previous releases
// This method can be safely removed and it has no effect
- Initialize()

// Use the non-generic variant instead
- Task<string> RenderAsync<TModel>(string viewName, object viewModel, Dictionary<string, object> viewBagOrViewData)

NuGet

Full Changelog: v1.9.0...v2.0.0-rc.1

v1.9.0

Choose a tag to compare

@soundaranbu soundaranbu released this 25 Aug 23:31

What's Changed

  • Added option to RenderPartialAsync when you don't need a layout page … by @mobiletonster in #52
  • Do not override IWebHostEnvironment when it's already present #58

New Contributors

NuGet

Full Changelog: v1.8.0...v1.9.0

v.1.9.0-rc.2

v.1.9.0-rc.2 Pre-release
Pre-release

Choose a tag to compare

@soundaranbu soundaranbu released this 25 Feb 19:15

What's Changed

NuGet

v.1.9.0-rc.1

v.1.9.0-rc.1 Pre-release
Pre-release

Choose a tag to compare

@soundaranbu soundaranbu released this 13 Nov 15:19

What's Changed

  • Added method RenderPartialAsync when you don't need a layout page … by @mobiletonster in #52

New Contributors

Full Changelog: v1.8.0...v1.9.0-rc.1

NuGet