Skip to content

Commit c1e41bd

Browse files
committed
Added Net5 target framework
1 parent f7737e6 commit c1e41bd

File tree

8 files changed

+29
-14
lines changed

8 files changed

+29
-14
lines changed

src/SharpGLTF.Core/SharpGLTF.Core.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
55
<AssemblyName>SharpGLTF.Core</AssemblyName>
66
<RootNamespace>SharpGLTF</RootNamespace>
77
<LangVersion>7.3</LangVersion>
@@ -23,7 +23,7 @@
2323
<Compile Include="..\Shared\_Extensions.cs" Link="_Extensions.cs" />
2424
</ItemGroup>
2525

26-
<ItemGroup>
26+
<ItemGroup Condition=" '$(TargetFramework)' != 'net5.0' ">
2727
<PackageReference Include="System.Text.Json" Version="5.0.2" />
2828
</ItemGroup>
2929

src/SharpGLTF.Toolkit/SharpGLTF.Toolkit.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
4+
<TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
55
<AssemblyName>SharpGLTF.Toolkit</AssemblyName>
66
<RootNamespace>SharpGLTF</RootNamespace>
77
<LangVersion>7.3</LangVersion>

tests/0_Readme.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
##Unit Testing
2+
3+
####Prerequisites
4+
5+
Before running the tests in Visual Studio, or by Command line, first we need to download the required test files.
6+
7+
To do so, we just need to run "1_DownloadTestFiles.cmd" once. If we need to update the test files we can run it again.
8+
9+
After the test files have been successfully downloaded, we can either run the tests in Visual Studio, or run "2_RunCoreTests.cmd" and "3_RunToolkitTests.cmd"
10+
11+
####Overview
12+
13+
Tests are performed against Net471, NetCore3.1 and Net5.
14+
15+
The reason to test against the three frameworks is because there's slight differences between the platforms that makes some test to pass in one framework, and fail in the other.
16+
17+
Most notably, the differences found are:
18+
19+
- System.Text.Json
20+
- Dependency issues: NetCore3.1 and Net5 use different depedencies by default
21+
- Net471 implementation is not able to do floating point roundtrips.
22+
- System.Numerics.Vectors Matrix4x4.CreatePerspective fail in Net471 when trying to use infinite far planes.

tests/0_Readme.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/2_RunCoreTests.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
dotnet test SharpGLTF.Tests\SharpGLTF.Core.Tests.csproj
1+
dotnet test SharpGLTF.Core.Tests\SharpGLTF.Core.Tests.csproj
22
pause

tests/SharpGLTF.Core.Tests/SharpGLTF.Core.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>SharpGLTF</RootNamespace>
77
<LangVersion>latest</LangVersion>

tests/SharpGLTF.ThirdParty.Tests/SharpGLTF.ThirdParty.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>SharpGLTF.ThirdParty</RootNamespace>
77
<LangVersion>latest</LangVersion>

tests/SharpGLTF.Toolkit.Tests/SharpGLTF.Toolkit.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
4+
<TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
<RootNamespace>SharpGLTF</RootNamespace>
77
<LangVersion>latest</LangVersion>

0 commit comments

Comments
 (0)