Browse Source

Added Net5 target framework

Vicente Penades 4 years ago
parent
commit
c1e41bd94c

+ 2 - 2
src/SharpGLTF.Core/SharpGLTF.Core.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
 
 
   <PropertyGroup>    
   <PropertyGroup>    
-    <TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
     <AssemblyName>SharpGLTF.Core</AssemblyName>
     <AssemblyName>SharpGLTF.Core</AssemblyName>
     <RootNamespace>SharpGLTF</RootNamespace>
     <RootNamespace>SharpGLTF</RootNamespace>
     <LangVersion>7.3</LangVersion>    
     <LangVersion>7.3</LangVersion>    
@@ -23,7 +23,7 @@
     <Compile Include="..\Shared\_Extensions.cs" Link="_Extensions.cs" />
     <Compile Include="..\Shared\_Extensions.cs" Link="_Extensions.cs" />
   </ItemGroup>  
   </ItemGroup>  
   
   
-  <ItemGroup>    
+  <ItemGroup Condition=" '$(TargetFramework)' != 'net5.0' ">    
     <PackageReference Include="System.Text.Json" Version="5.0.2" />
     <PackageReference Include="System.Text.Json" Version="5.0.2" />
   </ItemGroup>
   </ItemGroup>
 
 

+ 1 - 1
src/SharpGLTF.Toolkit/SharpGLTF.Toolkit.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
+    <TargetFrameworks>netstandard2.0;netcoreapp3.1;net5.0</TargetFrameworks>
     <AssemblyName>SharpGLTF.Toolkit</AssemblyName>
     <AssemblyName>SharpGLTF.Toolkit</AssemblyName>
     <RootNamespace>SharpGLTF</RootNamespace>    
     <RootNamespace>SharpGLTF</RootNamespace>    
     <LangVersion>7.3</LangVersion>    
     <LangVersion>7.3</LangVersion>    

+ 22 - 0
tests/0_Readme.md

@@ -0,0 +1,22 @@
+##Unit Testing
+
+####Prerequisites
+
+Before running the tests in Visual Studio, or by Command line, first we need to download the required test files.
+
+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.
+
+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"
+
+####Overview
+
+Tests are performed against Net471, NetCore3.1 and Net5.
+
+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.
+
+Most notably, the differences found are:
+
+- System.Text.Json
+  - Dependency issues: NetCore3.1 and Net5 use different depedencies by default
+  - Net471 implementation is not able to do floating point roundtrips.
+- System.Numerics.Vectors Matrix4x4.CreatePerspective  fail in Net471 when trying to use infinite far planes.

+ 0 - 7
tests/0_Readme.txt

@@ -1,7 +0,0 @@
-
-
-Before running the tests in Visual Studio, or by Command line, first we need to download the required test files.
-
-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.
-
-After the test files have been successfully downloaded, we can either run the tests in Visual Studio, or run "2_RunTests.cmd"

+ 1 - 1
tests/2_RunCoreTests.cmd

@@ -1,2 +1,2 @@
-dotnet test SharpGLTF.Tests\SharpGLTF.Core.Tests.csproj
+dotnet test SharpGLTF.Core.Tests\SharpGLTF.Core.Tests.csproj
 pause
 pause

+ 1 - 1
tests/SharpGLTF.Core.Tests/SharpGLTF.Core.Tests.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
     <IsPackable>false</IsPackable>
     <IsPackable>false</IsPackable>
     <RootNamespace>SharpGLTF</RootNamespace>
     <RootNamespace>SharpGLTF</RootNamespace>
     <LangVersion>latest</LangVersion>
     <LangVersion>latest</LangVersion>

+ 1 - 1
tests/SharpGLTF.ThirdParty.Tests/SharpGLTF.ThirdParty.Tests.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
     <IsPackable>false</IsPackable>
     <IsPackable>false</IsPackable>
     <RootNamespace>SharpGLTF.ThirdParty</RootNamespace>
     <RootNamespace>SharpGLTF.ThirdParty</RootNamespace>
     <LangVersion>latest</LangVersion>
     <LangVersion>latest</LangVersion>

+ 1 - 1
tests/SharpGLTF.Toolkit.Tests/SharpGLTF.Toolkit.Tests.csproj

@@ -1,7 +1,7 @@
 <Project Sdk="Microsoft.NET.Sdk">
 <Project Sdk="Microsoft.NET.Sdk">
 
 
   <PropertyGroup>
   <PropertyGroup>
-    <TargetFrameworks>netcoreapp3.1;net471</TargetFrameworks>
+    <TargetFrameworks>netcoreapp3.1;net471;net5.0</TargetFrameworks>
     <IsPackable>false</IsPackable>
     <IsPackable>false</IsPackable>
     <RootNamespace>SharpGLTF</RootNamespace>
     <RootNamespace>SharpGLTF</RootNamespace>
     <LangVersion>latest</LangVersion>
     <LangVersion>latest</LangVersion>