Skip to content

Commit

Permalink
Use SDK 8.0.203
Browse files Browse the repository at this point in the history
  • Loading branch information
asmichi committed Mar 16, 2024
1 parent 96b8b15 commit 52e8a94
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,6 @@ csharp_preserve_single_line_statements = false
csharp_preserve_single_line_blocks = true

[src/ChildProcess.Test/**.cs]
# Suppress false CA1825 on MemberData when using .NET 6 analyers
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1825
dotnet_diagnostic.CA1825.severity = none # Avoid zero-length array allocations.
# Fine for tests
dotnet_diagnostic.CA1861.severity = none # Prefer 'static readonly' fields over constant array arguments
dotnet_diagnostic.CA1849.severity = none # Call async methods when in an async method
4 changes: 2 additions & 2 deletions build/azure-pipelines/prepare-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ parameters: []

steps:
- task: UseDotNet@2
displayName: 'Use .NET SDK 6.0.412'
displayName: 'Use .NET SDK 8.0.203'
inputs:
packageType: sdk
version: 6.0.412
version: 8.0.203
6 changes: 3 additions & 3 deletions build/azure-pipelines/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ steps:
condition: ${{ ne(parameters.platform, 'win') }}
inputs:
targetType: 'inline'
script: 'chmod -R +x $(Build.SourcesDirectory)/bin/ChildProcess.Native $(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net6.0/runtimes'
script: 'chmod -R +x $(Build.SourcesDirectory)/bin/ChildProcess.Native $(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net8.0/runtimes'

# Our Alpine container cannot build, so copy TestChildNative here.
- task: CopyFiles@2
inputs:
sourceFolder: '$(Build.SourcesDirectory)/bin/ChildProcess.Native/${{ parameters.rid }}/${{ parameters.configuration }}'
contents: 'TestChildNative*'
targetFolder: '$(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net6.0'
targetFolder: '$(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net8.0'
overwrite: true

- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '$(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net6.0/Asmichi.ChildProcess.Test.dll'
projects: '$(Build.SourcesDirectory)/bin/ChildProcess.Test/AnyCPU/${{ parameters.configuration }}/net8.0/Asmichi.ChildProcess.Test.dll'
arguments: '-- RunConfiguration.TestSessionTimeout=${{ parameters.testTimeoutMilliseconds }}'
testRunTitle: ${{ parameters.rid }}
3 changes: 1 addition & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"sdk": {
"version": "6.0.412",
"rollForward": "latestFeature"
"version": "8.0.203"
}
}
2 changes: 1 addition & 1 deletion src/ChildProcess.Example/ChildProcess.Example.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
Expand Down
2 changes: 2 additions & 0 deletions src/ChildProcess.ExamplePreview/ChildProcessExamplesUnix.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
using System.Threading.Tasks;
using Asmichi.ProcessManagement;

#pragma warning disable CA1849 // Call async methods when in an async method

namespace Asmichi
{
public static class ChildProcessExamplesUnix
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
using System.Threading.Tasks;
using Asmichi.ProcessManagement;

#pragma warning disable CA1849 // Call async methods when in an async method

namespace Asmichi
{
public static class ChildProcessExamplesWindows
Expand Down
8 changes: 4 additions & 4 deletions src/ChildProcess.Test/ChildProcess.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
Expand Down Expand Up @@ -46,9 +46,9 @@
</PropertyGroup>

<ItemGroup>
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net6.0\TestChild.deps.json" />
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net6.0\TestChild.dll" />
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net6.0\TestChild.runtimeconfig.json" />
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net8.0\TestChild.deps.json" />
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net8.0\TestChild.dll" />
<TestChildBin Include="$(BinDir)TestChild\AnyCPU\$(Configuration)\net8.0\TestChild.runtimeconfig.json" />
<!-- Copy the TestChildNative executable for the current runtime so that our tests can pick it. -->
<TestChildBin Include="$(BinDir)ChildProcess.Native\$(NativeAssetsRid)\$(Configuration)\TestChildNative$(NativeAssetsExeExtension)" />
<Content Include="@(TestChildBin)">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright (c) @asmichi (https://github.com/asmichi). Licensed under the MIT License. See LICENCE in the project root for details.

using System.IO;
using System.Runtime.Serialization;
using System.Text;

namespace Asmichi.ProcessManagement
Expand Down Expand Up @@ -50,10 +49,5 @@ public ChildProcessFailedException(string message, System.Exception inner)
: base(message, inner)
{
}

protected ChildProcessFailedException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
2 changes: 1 addition & 1 deletion src/TestChild/TestChild.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>

<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
Expand Down

0 comments on commit 52e8a94

Please sign in to comment.