Changelog History
Page 1
-
v2.3.1 Changes
January 16, 2023👌 Improvements
Milestone Notes
Associated milestone tracker for v2.3.1:
https://github.com/toddams/RazorLight/milestone/19 -
v2.3.0 Changes
October 14, 2022🚀 This release publishes to nuget.org @MarkKharitonov 's Razorlight.Precompile package.
🚀 See previous version 2.2.0 release notes for details.
-
v2.2.0 Changes
October 14, 2022Issues By Milestone
#491 Feature Request: Generate an assembly and persist it to disk (Precompile views)
PRs By Milestone
#492 Implement the RazorLight.Precompile tool
✅ #500 Fix broken tests on Unix (related to RazorLight.Precompile) -
v2.1.0 Changes
July 15, 2022Issues By Milestone
📜 #481 System.UriFormatException: Invalid URI: The hostname could not be parsed (Fixed by @Xtansia #489 )
PRs By Milestone
- 📄 Docs updated by @mwasson74 , @vdurante
- 👌 Verify dependency updated by @SimonCropp
- ✅ Tests added by @jzabroski
-
v2.0 Changes
September 23, 2017What is new?
String rendering is back!
🐎 We added rendering of the strings back! And now they are cached, so you will not be affected by bad performance.
Note: if you store your templates in database - it is recommended approach to define custom RazorLightProject that fetches templates from database and create RazorLightEngine passing your implementation to it. This way, engine will your RazorLightProject to resolve layouts. String rendering is just another option for some exclusive use cases when you have microservice structure and pass templates between nodes, so you might not need it at all.
Here is an example of RazorLightProject that uses EntityFramework to get templates from database- https://github.com/toddams/RazorLight/blob/dev-2.0/samples/RazorLight.Samples/Program.cs
string templateKey = "key";string result = await engine.CompileRenderAsync(templateKey , "Hello @Model.Name", new { Name = "Johny" });//Returns true, so next time you render template with this key - it will not be compiled, but taken from cacheengine.TemplateCache.Contains(templateKey);➕ Additional metadata references
📇 When RazorLight compiles your template - it loads all the assemblies from your entry assembly and creates MetadataReference from it. This is a default strategy and it works in 99% of the time. But sometimes compilation crashes with an exception message like "Can not find assembly My.Super.Assembly2000". In order to solve this problem you can pass additional metadata references to RazorLight.
var options = new RazorLightOptions();var metadataReference = MetadataReference.CreateFromFile("path-to-your-assembly")options.AdditionalMetadataReferences.Add(metadataReference );var project = new FileSystemRazorProject("path-to-your-views");var engine = new EngineFactory().Create(project, options); -
v2.0.0-rc.6 Changes
February 16, 2022 -
v2.0.0-rc.4 Changes
December 10, 2021 -
v2.0.0-rc.2 Changes
November 18, 2020👻 #391 - Change exception type/message when project item does not exist (@maxbanas) - to help people troubleshoot issues like #378
🛠 #392 - Change targeting for .Net standard 2.0 (@Vincentvwal) - Fixes #390Generated from: https://github.com/toddams/RazorLight/milestone/11?closed=1
-
v2.0.0-rc.1 Changes
November 17, 2020- ✂ Removed Obsolete InplaceStringBuilder and replaced with stringbuilder. #380 (@ADNewsom09)
- required for .NET 5.0 support to work
- 👍 .NET 5.0 support #389 (@nm-a)
- ✂ Removed Obsolete InplaceStringBuilder and replaced with stringbuilder. #380 (@ADNewsom09)