Skip to content

Commit 0afe332

Browse files
committed
update SDK and TFMs
1 parent 46b4714 commit 0afe332

File tree

7 files changed

+27
-35
lines changed

7 files changed

+27
-35
lines changed

.github/workflows/ci.yml

+4-11
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@ name: CI
22

33
on: [push, pull_request]
44

5-
env:
6-
DOTNET_SDK_VERSION: '3.1.403'
7-
85
jobs:
96

107
build:
@@ -14,10 +11,8 @@ jobs:
1411
os: [ubuntu-latest, windows-latest]
1512
configuration: [Debug, Release]
1613
steps:
17-
- uses: actions/checkout@v1
18-
- uses: actions/setup-dotnet@v1
19-
with:
20-
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-dotnet@v4
2116
- name: Build and test
2217
shell: pwsh
2318
run: ./build-and-test.ps1 -configuration ${{ matrix.configuration }}
@@ -27,9 +22,7 @@ jobs:
2722
needs: [build]
2823
runs-on: windows-latest
2924
steps:
30-
- uses: actions/checkout@v1
31-
- uses: actions/setup-dotnet@v1
32-
with:
33-
dotnet-version: ${{ env.DOTNET_SDK_VERSION }}
25+
- uses: actions/checkout@v4
26+
- uses: actions/setup-dotnet@v4
3427
- run: .\build-and-test.ps1 -configuration Release -notest
3528
- run: dotnet nuget push .\artifacts\packages\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}

.vscode/tasks.json

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
{
2-
"version": "0.1.0",
2+
"version": "2.0.0",
33
"command": "dotnet",
4-
"isShellCommand": true,
54
"args": [],
65
"tasks": [
76
{
8-
"taskName": "build",
7+
"label": "build",
8+
"type": "shell",
9+
"command": "dotnet",
910
"args": [
11+
"build",
1012
"${workspaceRoot}/src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj"
1113
],
12-
"isBuildCommand": true,
13-
"problemMatcher": "$msCompile"
14+
"problemMatcher": "$msCompile",
15+
"group": {
16+
"_id": "build",
17+
"isDefault": false
18+
}
1419
}
1520
]
1621
}

global.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.300",
4+
"rollForward": "latestMinor"
5+
}
6+
}

src/IxMilia.Iges.Test/IgesEntityReaderTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ 208 0 0 1 0 D 6
13361336
");
13371337
Assert.Equal(new IgesPoint(1.0, 2.0, 3.0), flag.Location);
13381338
Assert.Equal(0.1, flag.RotationAngle);
1339-
Assert.Equal(1, flag.Leaders.Count);
1339+
Assert.Single(flag.Leaders);
13401340
}
13411341

13421342
[Fact, Trait(Traits.Feature, Traits.Features.Reading)]

src/IxMilia.Iges.Test/IxMilia.Iges.Test.csproj

+4-8
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,17 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<ProjectReference Include="..\IxMilia.Iges\IxMilia.Iges.csproj" />
1010
</ItemGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
14-
<PackageReference Include="xunit" Version="2.4.1" />
15-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
16-
</ItemGroup>
17-
18-
<ItemGroup>
19-
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
14+
<PackageReference Include="xunit" Version="2.9.0" />
15+
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
2016
</ItemGroup>
2117

2218
</Project>

src/IxMilia.Iges/IgesFile.cs

-4
Original file line numberDiff line numberDiff line change
@@ -66,30 +66,26 @@ public IgesFile()
6666
Entities = new List<IgesEntity>();
6767
}
6868

69-
#if HAS_FILESYSTEM_ACCESS
7069
public void Save(string path)
7170
{
7271
using (var stream = new FileStream(path, FileMode.Create))
7372
{
7473
Save(stream);
7574
}
7675
}
77-
#endif
7876

7977
public void Save(Stream stream)
8078
{
8179
new IgesFileWriter().Write(this, stream);
8280
}
8381

84-
#if HAS_FILESYSTEM_ACCESS
8582
public static IgesFile Load(string path)
8683
{
8784
using (var stream = new FileStream(path, FileMode.Open))
8885
{
8986
return Load(stream);
9087
}
9188
}
92-
#endif
9389

9490
public static IgesFile Load(Stream stream)
9591
{

src/IxMilia.Iges/IxMilia.Iges.csproj

+2-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Copyright>Copyright 2018</Copyright>
66
<AssemblyTitle>IxMilia.Iges</AssemblyTitle>
77
<Authors>IxMilia</Authors>
8-
<TargetFrameworks>netstandard1.0;netstandard1.3</TargetFrameworks>
8+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
99
<AssemblyName>IxMilia.Iges</AssemblyName>
1010
<PackageId>IxMilia.Iges</PackageId>
1111
<PackageTags>CAD;IGES;IGS</PackageTags>
@@ -18,12 +18,8 @@
1818
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
1919
</PropertyGroup>
2020

21-
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
22-
<DefineConstants>$(DefineConstants);HAS_FILESYSTEM_ACCESS</DefineConstants>
23-
</PropertyGroup>
24-
2521
<ItemGroup>
26-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
22+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
2723
</ItemGroup>
2824

2925
</Project>

0 commit comments

Comments
 (0)