diff --git a/.editorconfig b/.editorconfig
index ed9afcb4..098f0142 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -1,4 +1,17 @@
-[*.cs]
+[*]
+indent_style = space
+indent_size = 2
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.cs]
+indent_size = 4
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.cs]
# IDE0022: Use block body for method
csharp_style_expression_bodied_methods = when_on_single_line:silent
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1f063f5e..88638e18 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -17,6 +17,9 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ global-json-file: global.json
- name: Test
run: dotnet test -c Release
diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml
index e28f5c50..cb8a4a4a 100644
--- a/.github/workflows/pr.yml
+++ b/.github/workflows/pr.yml
@@ -18,6 +18,9 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ global-json-file: global.json
- name: Version
run: dotnet --version
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 80d0fddf..4c701860 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -15,10 +15,14 @@ jobs:
steps:
- uses: actions/checkout@v4
+ - uses: actions/setup-dotnet@v4
+ with:
+ global-json-file: global.json
+
- name: Install dependencies
run: dotnet restore
- name: Test
- run: dotnet test -c Release --framework net8.0
+ run: dotnet test -c Release --framework net9.0
- name: Pack with dotnet
run: |
arrTag=(${GITHUB_REF//\// })
diff --git a/Directory.Build.props b/Directory.Build.props
new file mode 100644
index 00000000..12e71cbb
--- /dev/null
+++ b/Directory.Build.props
@@ -0,0 +1,4 @@
+
+
+
+
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 2081aa66..6c5e0e59 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,23 +1,31 @@
-
+
true
+
+
+
+
+
+
+
+
+
-
+
+
+
-
-
+
-
-
-
+
@@ -25,4 +33,4 @@
-
\ No newline at end of file
+
diff --git a/Fluid.Benchmarks/ComparisonBenchmarks.cs b/Fluid.Benchmarks/ComparisonBenchmarks.cs
index 97341309..bfbfea7e 100644
--- a/Fluid.Benchmarks/ComparisonBenchmarks.cs
+++ b/Fluid.Benchmarks/ComparisonBenchmarks.cs
@@ -1,4 +1,4 @@
-using BenchmarkDotNet.Attributes;
+using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
namespace Fluid.Benchmarks
@@ -6,11 +6,11 @@ namespace Fluid.Benchmarks
[MemoryDiagnoser, GroupBenchmarksBy(BenchmarkLogicalGroupRule.ByCategory), ShortRunJob]
public class ComparisonBenchmarks
{
- private FluidBenchmarks _fluidBenchmarks = new FluidBenchmarks();
- private HandlebarsBenchmarks _handlebarsBenchmarks = new HandlebarsBenchmarks();
- private DotLiquidBenchmarks _dotLiquidBenchmarks = new DotLiquidBenchmarks();
- private LiquidNetBenchmarks _liquidNetBenchmarks = new LiquidNetBenchmarks();
- private ScribanBenchmarks _scribanBenchmarks = new ScribanBenchmarks();
+ private readonly FluidBenchmarks _fluidBenchmarks = new FluidBenchmarks();
+ private readonly HandlebarsBenchmarks _handlebarsBenchmarks = new HandlebarsBenchmarks();
+ private readonly DotLiquidBenchmarks _dotLiquidBenchmarks = new DotLiquidBenchmarks();
+ private readonly LiquidNetBenchmarks _liquidNetBenchmarks = new LiquidNetBenchmarks();
+ private readonly ScribanBenchmarks _scribanBenchmarks = new ScribanBenchmarks();
[Benchmark(Baseline = true), BenchmarkCategory("Parse")]
public object Fluid_Parse()
diff --git a/Fluid.Benchmarks/Fluid.Benchmarks.csproj b/Fluid.Benchmarks/Fluid.Benchmarks.csproj
index 4212de56..fd13973e 100644
--- a/Fluid.Benchmarks/Fluid.Benchmarks.csproj
+++ b/Fluid.Benchmarks/Fluid.Benchmarks.csproj
@@ -2,11 +2,12 @@
Exe
- net8.0
+ net9.0
$(NoWarn);NU5104
$(NoWarn);NU1903
false
+ false
diff --git a/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj b/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj
index 7f183536..839c1df7 100644
--- a/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj
+++ b/Fluid.MinimalApisSample/Fluid.MinimalApisSample.csproj
@@ -1,9 +1,9 @@
- net8.0
- enable
- Exe
+ net9.0
+ enable
+ Exe
$(NoWarn);NU5104
false
preview
diff --git a/Fluid.MvcSample/Fluid.MvcSample.csproj b/Fluid.MvcSample/Fluid.MvcSample.csproj
index b77acfe2..0ad16a8f 100644
--- a/Fluid.MvcSample/Fluid.MvcSample.csproj
+++ b/Fluid.MvcSample/Fluid.MvcSample.csproj
@@ -1,7 +1,7 @@
- net8.0
+ net9.0
Exe
$(NoWarn);NU5104
false
diff --git a/Fluid.MvcViewEngine/Directory.Build.props b/Fluid.MvcViewEngine/Directory.Build.props
deleted file mode 100644
index 6da39a34..00000000
--- a/Fluid.MvcViewEngine/Directory.Build.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- Fluid.MvcViewEngine
- Fluid.MvcViewEngine is a view engine for ASP.NET Core MVC based on Liquid templates.
-
-
-
-
-
diff --git a/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj b/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj
index 0b0c33fb..25b741f0 100644
--- a/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj
+++ b/Fluid.MvcViewEngine/Fluid.MvcViewEngine.csproj
@@ -1,10 +1,12 @@
- net6.0;net8.0
+ net6.0;net8.0;net9.0
latest
logo_64x64.png
true
+ Fluid.MvcViewEngine
+ Fluid.MvcViewEngine is a view engine for ASP.NET Core MVC based on Liquid templates.
$(NoWarn);NETSDK1138
@@ -14,22 +16,22 @@
-
-
+
+
-
-
-
-
+
+
+
+
ExceptionHelper.cs
diff --git a/Fluid.Tests/Fluid.Tests.csproj b/Fluid.Tests/Fluid.Tests.csproj
index 21b15809..7f9f3cd0 100644
--- a/Fluid.Tests/Fluid.Tests.csproj
+++ b/Fluid.Tests/Fluid.Tests.csproj
@@ -1,10 +1,11 @@
- net6.0;net8.0
+ net6.0;net8.0;net9.0
latest
$(DefineConstants);COMPILED
false
+ false
diff --git a/Fluid.ViewEngine/Directory.Build.props b/Fluid.ViewEngine/Directory.Build.props
deleted file mode 100644
index af1364f8..00000000
--- a/Fluid.ViewEngine/Directory.Build.props
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
- Fluid.ViewEngine
- Fluid.ViewEngine is a reusable library to build view engines based on Liquid templates. It supports Layouts, Sections, Bodies, ViewStarts like the Razor ASP.NET MVC engine.
-
-
-
-
-
diff --git a/Fluid.ViewEngine/Fluid.ViewEngine.csproj b/Fluid.ViewEngine/Fluid.ViewEngine.csproj
index 15824fb5..12c9dffd 100644
--- a/Fluid.ViewEngine/Fluid.ViewEngine.csproj
+++ b/Fluid.ViewEngine/Fluid.ViewEngine.csproj
@@ -1,10 +1,12 @@
- netstandard2.0;net6.0;net8.0
+ netstandard2.0;net6.0;net8.0;net9.0
latest
true
logo_64x64.png
+ Fluid.ViewEngine
+ Fluid.ViewEngine is a reusable library to build view engines based on Liquid templates. It supports Layouts, Sections, Bodies, ViewStarts like the Razor ASP.NET MVC engine.
diff --git a/Fluid.sln b/Fluid.sln
index eb3cab68..dd47b267 100644
--- a/Fluid.sln
+++ b/Fluid.sln
@@ -15,14 +15,17 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fluid.MvcViewEngine", "Flui
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{BE5EF08E-5F79-4BBA-BA72-F4E26E281125}"
ProjectSection(SolutionItems) = preProject
+ .editorconfig = .editorconfig
.github\workflows\build.yml = .github\workflows\build.yml
Common.props = Common.props
CREDITS.md = CREDITS.md
+ Directory.Build.props = Directory.Build.props
Directory.Packages.props = Directory.Packages.props
NuGet.config = NuGet.config
.github\workflows\pr.yml = .github\workflows\pr.yml
.github\workflows\publish.yml = .github\workflows\publish.yml
README.md = README.md
+ Versions.props = Versions.props
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fluid.ViewEngine", "Fluid.ViewEngine\Fluid.ViewEngine.csproj", "{3510D4C5-8328-4425-B2F1-B8591E85B965}"
@@ -32,9 +35,6 @@ EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fluid.MinimalApisSample", "Fluid.MinimalApisSample\Fluid.MinimalApisSample.csproj", "{6390F2D4-564B-455E-9C02-3DB998E5BD09}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{D1E1DE19-67EF-43C8-BC9A-53E60D65ECFE}"
- ProjectSection(SolutionItems) = preProject
- .editorconfig = .editorconfig
- EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/Fluid/Directory.Build.props b/Fluid/Directory.Build.props
deleted file mode 100644
index 3f51a240..00000000
--- a/Fluid/Directory.Build.props
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
- Fluid.Core
- Fluid Template Engine
- Fluid is a template engine based on the Liquid markup, with focus on performance and .NET programming patterns.
- fluid;liquid;template;view engine
- logo_64x64.png
-
-
-
-
-
-
-
-
-
diff --git a/Fluid/Filters/MiscFilters.cs b/Fluid/Filters/MiscFilters.cs
index 2d374aec..b2bfd79b 100644
--- a/Fluid/Filters/MiscFilters.cs
+++ b/Fluid/Filters/MiscFilters.cs
@@ -1,4 +1,4 @@
-using Fluid.Values;
+using Fluid.Values;
using System.Buffers;
using System.Globalization;
using System.Net;
diff --git a/Fluid/Fluid.csproj b/Fluid/Fluid.csproj
index 7a995670..db339c78 100644
--- a/Fluid/Fluid.csproj
+++ b/Fluid/Fluid.csproj
@@ -1,10 +1,15 @@
- netstandard2.0;net6.0;net8.0
+ netstandard2.0;net6.0;net8.0;net9.0
true
latest
true
+ Fluid.Core
+ Fluid Template Engine
+ Fluid is a template engine based on the Liquid markup, with focus on performance and .NET programming patterns.
+ fluid;liquid;template;view engine
+ logo_64x64.png
true
true
@@ -25,6 +30,10 @@
$(NoWarn);CA2012
+
+
+
+
@@ -36,7 +45,7 @@
-
+
@@ -44,6 +53,9 @@
+
+
+
README.md
diff --git a/MinimalApis.LiquidViews/Directory.Build.props b/MinimalApis.LiquidViews/Directory.Build.props
deleted file mode 100644
index bf33c7a3..00000000
--- a/MinimalApis.LiquidViews/Directory.Build.props
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/MinimalApis.LiquidViews/LiquidResults.cs b/MinimalApis.LiquidViews/LiquidResults.cs
index ac3d3e16..d5cbe3cf 100644
--- a/MinimalApis.LiquidViews/LiquidResults.cs
+++ b/MinimalApis.LiquidViews/LiquidResults.cs
@@ -1,4 +1,4 @@
-using MinimalApis.LiquidViews;
+using MinimalApis.LiquidViews;
namespace Microsoft.AspNetCore.Http
{
diff --git a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj
index de13c108..aa9215e2 100644
--- a/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj
+++ b/MinimalApis.LiquidViews/MinimalApis.LiquidViews.csproj
@@ -1,7 +1,7 @@
- net7.0;net8.0
+ net8.0;net9.0
9
true
logo_64x64.png
@@ -17,12 +17,8 @@
-
-
-
-
-
-
+
+
@@ -31,5 +27,5 @@
-
+
diff --git a/Versions.props b/Versions.props
new file mode 100644
index 00000000..dd83bae7
--- /dev/null
+++ b/Versions.props
@@ -0,0 +1,14 @@
+
+
+
+ 9.0.0
+
+
+
+ 6.0.1
+
+
+
+ 8.0.0
+
+
diff --git a/global.json b/global.json
new file mode 100644
index 00000000..aad16d85
--- /dev/null
+++ b/global.json
@@ -0,0 +1,6 @@
+{
+ "sdk": {
+ "version": "9.0.100",
+ "rollForward": "latestMajor"
+ }
+}