Browse Source

github actions to .net 8

Bert Temme 2 years ago
parent
commit
e3e88b4ecb

+ 1 - 1
.github/workflows/dotnet.yml

@@ -8,7 +8,7 @@ jobs:
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
-        dotnet-version: [ '6.0.x' ]
+        dotnet-version: [ '8.0.x' ]
         os: [windows-latest, ubuntu-latest, macos-latest]
 
     steps:

+ 2 - 1
src/SharpGLTF.Cesium/Schema2/MeshExtMeshFeatures.cs

@@ -1,6 +1,7 @@
 using SharpGLTF.Validation;
 using System.Collections.Generic;
 using System.Linq;
+using System.Xml.Linq;
 
 namespace SharpGLTF.Schema2
 {
@@ -26,7 +27,7 @@ namespace SharpGLTF.Schema2
 
         protected override void OnValidateContent(ValidationContext validate)
         {
-            var extMeshFeatures = (MeshExtMeshFeatures)_meshPrimitive.Extensions.FirstOrDefault();
+            var extMeshFeatures = (MeshExtMeshFeatures)_meshPrimitive.Extensions.Where(item => item is MeshExtMeshFeatures).FirstOrDefault();
 
             validate.NotNull(nameof(FeatureIds), extMeshFeatures.FeatureIds);
             validate.IsTrue(nameof(FeatureIds), extMeshFeatures.FeatureIds.Count > 0, "FeatureIds has items");

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

@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
 
   <PropertyGroup>
     <TargetFrameworks>net471;net8.0-windows</TargetFrameworks>