diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 923ded9..d4122d9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,9 +2,6 @@ name: CI on: [push, pull_request] -env: - DOTNET_SDK_VERSION: '3.1.403' - jobs: build: @@ -14,10 +11,8 @@ jobs: os: [ubuntu-latest, windows-latest] configuration: [Debug, Release] steps: - - uses: actions/checkout@v1 - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_SDK_VERSION }} + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 - name: Build and test shell: pwsh run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }} @@ -27,9 +22,7 @@ jobs: needs: [build] runs-on: windows-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ env.DOTNET_SDK_VERSION }} + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 - run: .\build-and-test.ps1 -configuration Release -notest - run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 335673e..7171f99 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,16 +1,21 @@ { - "version": "0.1.0", + "version": "2.0.0", "command": "dotnet", - "isShellCommand": true, "args": [], "tasks": [ { - "taskName": "build", + "label": "build", + "type": "shell", + "command": "dotnet", "args": [ + "build", "${workspaceRoot}/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj" ], - "isBuildCommand": true, - "problemMatcher": "$msCompile" + "problemMatcher": "$msCompile", + "group": { + "_id": "build", + "isDefault": false + } } ] } \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..8d0a1c0 --- /dev/null +++ b/global.json @@ -0,0 +1,6 @@ +{ + "sdk": { + "version": "8.0.300", + "rollForward": "latestMinor" + } +} \ No newline at end of file diff --git a/src/IxMilia.Iges.Test/IgesEntityReaderTests.cs b/src/IxMilia.Iges.Test/IgesEntityReaderTests.cs index b223617..ee52f24 100644 --- a/src/IxMilia.Iges.Test/IgesEntityReaderTests.cs +++ b/src/IxMilia.Iges.Test/IgesEntityReaderTests.cs @@ -1336,7 +1336,7 @@ 208 0 0 1 0 D 6 "); Assert.Equal(new IgesPoint(1.0, 2.0, 3.0), flag.Location); Assert.Equal(0.1, flag.RotationAngle); - Assert.Equal(1, flag.Leaders.Count); + Assert.Single(flag.Leaders); } [Fact, Trait(Traits.Feature, Traits.Features.Reading)] diff --git a/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj b/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj index 0bca68b..ac3f042 100644 --- a/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj +++ b/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj @@ -2,7 +2,7 @@ Exe - netcoreapp3.1 + net8.0 @@ -10,13 +10,9 @@ - - - - - - - + + + diff --git a/src/IxMilia.Iges/IgesFile.cs b/src/IxMilia.Iges/IgesFile.cs index f80ed0a..7e59067 100644 --- a/src/IxMilia.Iges/IgesFile.cs +++ b/src/IxMilia.Iges/IgesFile.cs @@ -66,7 +66,6 @@ public IgesFile() Entities = new List(); } -#if HAS_FILESYSTEM_ACCESS public void Save(string path) { using (var stream = new FileStream(path, FileMode.Create)) @@ -74,14 +73,12 @@ public void Save(string path) Save(stream); } } -#endif public void Save(Stream stream) { new IgesFileWriter().Write(this, stream); } -#if HAS_FILESYSTEM_ACCESS public static IgesFile Load(string path) { using (var stream = new FileStream(path, FileMode.Open)) @@ -89,7 +86,6 @@ public static IgesFile Load(string path) return Load(stream); } } -#endif public static IgesFile Load(Stream stream) { diff --git a/src/IxMilia.Iges/IxMilia.Iges.csproj b/src/IxMilia.Iges/IxMilia.Iges.csproj index 2334c8e..06be37e 100644 --- a/src/IxMilia.Iges/IxMilia.Iges.csproj +++ b/src/IxMilia.Iges/IxMilia.Iges.csproj @@ -5,7 +5,7 @@ Copyright 2018 IxMilia.Iges IxMilia - netstandard1.0;netstandard1.3 + netstandard2.0 IxMilia.Iges IxMilia.Iges CAD;IGES;IGS @@ -18,12 +18,8 @@ $(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb - - $(DefineConstants);HAS_FILESYSTEM_ACCESS - - - +