Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/toddams/RazorLight
Browse files Browse the repository at this point in the history
  • Loading branch information
jzabroski committed Nov 16, 2020
2 parents 1984903 + f1b31c0 commit 45d5277
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 84 deletions.
5 changes: 5 additions & 0 deletions RazorLight.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion samples/RazorLight.Samples/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
42 changes: 21 additions & 21 deletions samples/RazorLight.Samples/Samples.EntityFrameworkProject.csproj
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<IsPackable>false</IsPackable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.1.14" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="2.1.14" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.0.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="3.1.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\RazorLight\RazorLight.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\RazorLight\RazorLight.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion sandbox/RazorLight.Sandbox/RazorLight.Sandbox.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
<TargetFrameworks>net5.0</TargetFrameworks>
<PreserveCompilationContext>true</PreserveCompilationContext>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/RazorLight.Precompile/RazorLight.Precompile.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions src/RazorLight/DefaultRazorEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ public override IEnumerable<RazorProjectItem> EnumerateItems(string basePath)
}


#if (NETCOREAPP3_0 || NETCOREAPP3_1)
#if (NETCOREAPP3_0 || NETCOREAPP3_1 || NET5_0)
[System.Obsolete]
#endif
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();
Expand Down
17 changes: 15 additions & 2 deletions src/RazorLight/RazorLight.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
Expand Down Expand Up @@ -33,7 +33,7 @@
<PackageReference Include="Microsoft.Extensions.Primitives" Version="[2.1.0,3)" />
<PackageReference Include="System.Buffers" Version="4.5.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="[3.0.3,3.1)" />
Expand All @@ -60,6 +60,19 @@
<PackageReference Include="System.Buffers" Version="4.5.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.Extensions" Version="5.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Razor" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Abstractions" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Physical" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Primitives" Version="5.0.0" />
<PackageReference Include="System.Buffers" Version="4.5.1" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
Expand Down
112 changes: 56 additions & 56 deletions tests/RazorLight.Tests/RazorLight.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<DefineConstants>$(DefineConstants);SOME_TEST_DEFINE</DefineConstants>
</PropertyGroup>
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;netcoreapp3.1;net5.0</TargetFrameworks>
<IsPackable>false</IsPackable>
<PreserveCompilationContext>true</PreserveCompilationContext>
<DefineConstants>$(DefineConstants);SOME_TEST_DEFINE</DefineConstants>
</PropertyGroup>

<PropertyGroup>
<MdTargetDir>$(SolutionDir)</MdTargetDir>
</PropertyGroup>
<PropertyGroup>
<MdTargetDir>$(SolutionDir)</MdTargetDir>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>false</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<Optimize>false</Optimize>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<None Remove="Assets\Embedded\*.cshtml" />
<EmbeddedResource Include="Assets\Embedded\*.cshtml" />
</ItemGroup>
<ItemGroup>
<None Remove="Assets\Embedded\*.cshtml" />
<EmbeddedResource Include="Assets\Embedded\*.cshtml" />
</ItemGroup>

<ItemGroup>
<None Update="Assets\Files\*.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="Assets\Files\*.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="MarkdownSnippets.MsBuild" Version="19.0.1" />
<PackageReference Include="Moq" Version="4.7.99" />
<PackageReference Include="Pose" Version="1.2.1" />
<PackageReference Include="Verify.Xunit" Version="5.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MarkdownSnippets.MsBuild" Version="19.0.1" />
<PackageReference Include="Moq" Version="4.7.99" />
<PackageReference Include="Pose" Version="1.2.1" />
<PackageReference Include="Verify.Xunit" Version="5.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.0.3" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.0.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="3.1.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="5.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\RazorLight\RazorLight.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\RazorLight\RazorLight.csproj" />
</ItemGroup>

<ItemGroup>
<None Update="Assets\Files\Subfolder\Empty.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Update="Assets\Files\Subfolder\Empty.cshtml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>


</Project>

0 comments on commit 45d5277

Please sign in to comment.