From 3b98bd78e7c8ea07dc2bce536ea2eff3c87a2217 Mon Sep 17 00:00:00 2001 From: nm Date: Fri, 13 Nov 2020 05:13:57 +0530 Subject: [PATCH 1/2] .NET 5.0 changes --- RazorLight.sln | 5 +++ samples/RazorLight.Samples/Program.cs | 2 +- .../Samples.EntityFrameworkProject.csproj | 42 +++++++++---------- .../RazorLight.Sandbox.csproj | 2 +- .../RazorLight.Precompile.csproj | 2 +- src/RazorLight/DefaultRazorEngine.cs | 4 +- src/RazorLight/RazorLight.csproj | 31 +++++++------- .../RazorLight.Tests/RazorLight.Tests.csproj | 14 +++---- 8 files changed, 52 insertions(+), 50 deletions(-) diff --git a/RazorLight.sln b/RazorLight.sln index 9918d568..8186e057 100644 --- a/RazorLight.sln +++ b/RazorLight.sln @@ -39,6 +39,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Publish", "Publish", "{03C5 makeNuget.cmd = makeNuget.cmd EndProjectSection EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EC25D85F-CCCC-43E1-AACD-2D710C1B760B}" + ProjectSection(SolutionItems) = preProject + .editorconfig = .editorconfig + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/samples/RazorLight.Samples/Program.cs b/samples/RazorLight.Samples/Program.cs index 12798daa..9a623d80 100644 --- a/samples/RazorLight.Samples/Program.cs +++ b/samples/RazorLight.Samples/Program.cs @@ -27,7 +27,7 @@ static void Main(string[] args) string templateKey = "2"; var model = new TestViewModel() { Name = "Johny", Age = 22 }; -#if (NETCOREAPP3_0 || NETCOREAPP3_1) +#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) model.Age = 40; #endif string result = engine.CompileRenderAsync(templateKey, model).Result; diff --git a/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj b/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj index 4c63e168..4370138f 100644 --- a/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj +++ b/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj @@ -1,29 +1,29 @@  - - Exe - netcoreapp2.1;netcoreapp3.0;netcoreapp3.1 - true - false - + + Exe + netcoreapp3.0;netcoreapp3.1;net5.0 + true + false + - - - - + + + + - - - - + + + + - - - - + + + + - - - + + + diff --git a/sandbox/RazorLight.Sandbox/RazorLight.Sandbox.csproj b/sandbox/RazorLight.Sandbox/RazorLight.Sandbox.csproj index 9da5c914..16f18ff9 100644 --- a/sandbox/RazorLight.Sandbox/RazorLight.Sandbox.csproj +++ b/sandbox/RazorLight.Sandbox/RazorLight.Sandbox.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.0 + net5.0 true false diff --git a/src/RazorLight.Precompile/RazorLight.Precompile.csproj b/src/RazorLight.Precompile/RazorLight.Precompile.csproj index 5f802030..dd4adb85 100644 --- a/src/RazorLight.Precompile/RazorLight.Precompile.csproj +++ b/src/RazorLight.Precompile/RazorLight.Precompile.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp2.0;netcoreapp3.0;netcoreapp3.1 + netcoreapp3.0;netcoreapp3.1;net5.0 false diff --git a/src/RazorLight/DefaultRazorEngine.cs b/src/RazorLight/DefaultRazorEngine.cs index 501ac619..82dc9756 100644 --- a/src/RazorLight/DefaultRazorEngine.cs +++ b/src/RazorLight/DefaultRazorEngine.cs @@ -57,7 +57,7 @@ public override IEnumerable EnumerateItems(string basePath) } -#if (NETCOREAPP3_0 || NETCOREAPP3_1) +#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) [System.Obsolete] #endif public override RazorProjectItem GetItem(string path) @@ -65,7 +65,7 @@ public override RazorProjectItem GetItem(string path) throw new System.NotImplementedException(); } -#if (NETCOREAPP3_0 || NETCOREAPP3_1) +#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0) public override RazorProjectItem GetItem(string path, string fileKind) { throw new System.NotImplementedException(); diff --git a/src/RazorLight/RazorLight.csproj b/src/RazorLight/RazorLight.csproj index f139e058..bdc5b932 100644 --- a/src/RazorLight/RazorLight.csproj +++ b/src/RazorLight/RazorLight.csproj @@ -1,6 +1,6 @@  - netstandard2.0;netcoreapp3.0;netcoreapp3.1 + netcoreapp3.0;netcoreapp3.1;net5.0 @@ -18,22 +18,6 @@ LICENSE - - - - - - - - - - - - - - - - @@ -60,6 +44,19 @@ + + + + + + + + + + + + + True diff --git a/tests/RazorLight.Tests/RazorLight.Tests.csproj b/tests/RazorLight.Tests/RazorLight.Tests.csproj index 87515168..b891e88d 100644 --- a/tests/RazorLight.Tests/RazorLight.Tests.csproj +++ b/tests/RazorLight.Tests/RazorLight.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.0;netcoreapp3.0;netcoreapp3.1 + netcoreapp3.0;netcoreapp3.1;net5.0 false true $(DefineConstants);SOME_TEST_DEFINE @@ -40,12 +40,6 @@ - - - - - - @@ -58,6 +52,12 @@ + + + + + + From db6f3f6eaad1a8ae2ae0ede300717078bccc19d3 Mon Sep 17 00:00:00 2001 From: nm Date: Fri, 13 Nov 2020 16:42:35 +0530 Subject: [PATCH 2/2] version names corrected --- .../Samples.EntityFrameworkProject.csproj | 8 +- .../RazorLight.Precompile.csproj | 2 +- src/RazorLight/RazorLight.csproj | 18 ++- .../RazorLight.Tests/RazorLight.Tests.csproj | 104 +++++++++--------- 4 files changed, 74 insertions(+), 58 deletions(-) diff --git a/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj b/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj index 4370138f..11c8d6d3 100644 --- a/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj +++ b/samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj @@ -2,14 +2,14 @@ Exe - netcoreapp3.0;netcoreapp3.1;net5.0 + netcoreapp2.1;netcoreapp3.1;net5.0 true false - - - + + + diff --git a/src/RazorLight.Precompile/RazorLight.Precompile.csproj b/src/RazorLight.Precompile/RazorLight.Precompile.csproj index dd4adb85..6714cc93 100644 --- a/src/RazorLight.Precompile/RazorLight.Precompile.csproj +++ b/src/RazorLight.Precompile/RazorLight.Precompile.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.0;netcoreapp3.1;net5.0 + netcoreapp2.1;netcoreapp3.1;net5.0 false diff --git a/src/RazorLight/RazorLight.csproj b/src/RazorLight/RazorLight.csproj index bdc5b932..688685a8 100644 --- a/src/RazorLight/RazorLight.csproj +++ b/src/RazorLight/RazorLight.csproj @@ -1,6 +1,6 @@  - netcoreapp3.0;netcoreapp3.1;net5.0 + netstandard2.0;netcoreapp3.1;net5.0 @@ -18,6 +18,22 @@ LICENSE + + + + + + + + + + + + + + + + diff --git a/tests/RazorLight.Tests/RazorLight.Tests.csproj b/tests/RazorLight.Tests/RazorLight.Tests.csproj index b891e88d..be63e441 100644 --- a/tests/RazorLight.Tests/RazorLight.Tests.csproj +++ b/tests/RazorLight.Tests/RazorLight.Tests.csproj @@ -1,72 +1,72 @@  - - netcoreapp3.0;netcoreapp3.1;net5.0 - false - true - $(DefineConstants);SOME_TEST_DEFINE - + + netcoreapp2.0;netcoreapp3.1;net5.0 + false + true + $(DefineConstants);SOME_TEST_DEFINE + - - $(SolutionDir) - + + $(SolutionDir) + - - true - + + true + - - false - true - + + false + true + - - - - + + + + - - - PreserveNewest - - + + + PreserveNewest + + - - - - - - - - + + + + + + + + - - - - - + + + + + - - - - - + + + + + - + - - - + + + - - - PreserveNewest - - + + + PreserveNewest + +