Releases: soundaranbu/Razor.Templating.Core
v3.1.0
What's Changed
- Use default action context when endpoint is null by @soundaranbu in #97
- Feature/publish workflow by @soundaranbu in #98
Full Changelog: v3.0.0...v3.1.0
v3.1.0-rc.1
What's Changed
- Use default action context when endpoint is null by @soundaranbu in #97
Full Changelog: v3.0.0...v3.1.0-rc.1
v3.0.0
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
- 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
- Removed obsolete
IActionContextAccessorusage by @soundaranbu in #91 - Updated to net10.0 by @soundaranbu in #93
Other changes since last release
- Added tests for rendering localized strings by @soundaranbu in #86
- Feature/slnx by @soundaranbu in #83
- Run tests on .NET 9 by @soundaranbu in #77
NuGet Package
Full Changelog: v2.1.0...v3.0.0
v2.1.0
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
- Same changes as v2.1.0-rc.1
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
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
v2.0.0-rc.1
What's Changed
- New methods to render if view not exists by @soundaranbu in #66
+ 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
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
- @mobiletonster made their first contribution in #52
NuGet
Full Changelog: v1.8.0...v1.9.0
v.1.9.0-rc.2
What's Changed
- #58 Do not override
IWebHostEnvironmentwhen it's already present - Full Changelog: v1.9.0-rc.1...v.1.9.0-rc.2
NuGet
v.1.9.0-rc.1
What's Changed
- Added method
RenderPartialAsyncwhen you don't need a layout page … by @mobiletonster in #52
New Contributors
- @mobiletonster made their first contribution in #52
Full Changelog: v1.8.0...v1.9.0-rc.1