Skip to content

Commit

Permalink
update SDK and TFMs
Browse files Browse the repository at this point in the history
  • Loading branch information
brettfo committed Aug 30, 2024
1 parent 467aa35 commit 6161a2c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 27 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,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: '3.1.201'
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
- name: Build and test
shell: pwsh
run: |
Expand Down
15 changes: 10 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -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.Step.Test/IxMilia.Step.Test.csproj"
],
"isBuildCommand": true,
"problemMatcher": "$msCompile"
"problemMatcher": "$msCompile",
"group": {
"_id": "build",
"isDefault": false
}
}
]
}
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "8.0.300",
"rollForward": "latestMinor"
}
}
12 changes: 4 additions & 8 deletions src/IxMilia.Step.Test/IxMilia.Step.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,17 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\IxMilia.Step\IxMilia.Step.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>

<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>

</Project>
8 changes: 2 additions & 6 deletions src/IxMilia.Step/IxMilia.Step.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Copyright>Copyright 2017</Copyright>
<AssemblyTitle>IxMilia.Step</AssemblyTitle>
<Authors>IxMilia</Authors>
<TargetFrameworks>netstandard1.0;netstandard1.3</TargetFrameworks>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<AssemblyName>IxMilia.Step</AssemblyName>
<PackageId>IxMilia.Step</PackageId>
<PackageTags>CAD;STEP;STP</PackageTags>
Expand All @@ -18,12 +18,8 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard1.3'">
<DefineConstants>$(DefineConstants);HAS_FILESYSTEM_ACCESS</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
</ItemGroup>

</Project>
4 changes: 0 additions & 4 deletions src/IxMilia.Step/StepFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ public StepFile()
Items = new List<StepRepresentationItem>();
}

#if HAS_FILESYSTEM_ACCESS
public static StepFile Load(string path)
{
using (var stream = new FileStream(path, FileMode.Open))
{
return Load(stream);
}
}
#endif

public static StepFile Load(Stream stream)
{
Expand All @@ -79,15 +77,13 @@ public string GetContentsAsString(bool inlineReferences = false)
return writer.GetContents();
}

#if HAS_FILESYSTEM_ACCESS
public void Save(string path, bool inlineReferences = false)
{
using (var stream = new FileStream(path, FileMode.Create))
{
Save(stream, inlineReferences);
}
}
#endif

public void Save(Stream stream, bool inlineReferences = false)
{
Expand Down

0 comments on commit 6161a2c

Please sign in to comment.