Skip to content

Commit

Permalink
Support for .NET 6.0 (#89)
Browse files Browse the repository at this point in the history
* Updates for .NET 6.0

* Updated CI

* Install .NET 6.0 SDK on E2E-test leg
  • Loading branch information
gfoidl authored Nov 15, 2021
1 parent e611f5d commit 46a5a77
Show file tree
Hide file tree
Showing 16 changed files with 53 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .azure/pipelines/jobs/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ jobs:
- job: build_test
displayName: build and test
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
strategy:
matrix:
debug-build:
BUILD_CONFIG: Debug
release-build:
BUILD_CONFIG: Release
steps:
# Already installed on current hosted agents
#- template: steps/dotnet-install.yml
# ~Already installed on current hosted agents~
- template: steps/dotnet-install.yml

- bash: |
echo 'installed sdks:'
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/jobs/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jobs:
- job: coverage_report_quality
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
steps:
# checkout is needed for file-references
#- checkout: none
Expand Down
2 changes: 1 addition & 1 deletion .azure/pipelines/jobs/deploy_nuget.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
jobs:
- job: deploy_nuget
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
steps:
- checkout: none

Expand Down
6 changes: 3 additions & 3 deletions .azure/pipelines/jobs/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ jobs:
- job: e2e_tests
displayName: e2e tests
pool:
vmImage: 'ubuntu-18.04'
vmImage: 'ubuntu-20.04'
steps:
# Already installed on current hosted agents
#- template: steps/dotnet-install.yml
# ~Already installed on current hosted agents~
- template: steps/dotnet-install.yml

- bash: |
sudo apt update
Expand Down
16 changes: 13 additions & 3 deletions .azure/pipelines/jobs/steps/dotnet-install.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
steps:
- task: UseDotNet@2
displayName: 'Use dotnet sdk 5.0'
displayName: 'Use .NET SDK 6.0'
inputs:
version: 6.x
includePreviewVersions: true
installationPath: $(Agent.ToolsDirectory)/dotnet

- task: UseDotNet@2
displayName: 'Use .NET SDK 5.0'
inputs:
version: 5.x
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Use dotnet sdk 3.1'
displayName: 'Use .NET SDK 3.1'
inputs:
version: 3.1.x
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true

- task: UseDotNet@2
displayName: 'Use dotnet sdk 2.1'
displayName: 'Use .NET SDK 2.1'
inputs:
version: 2.1.x
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
42 changes: 0 additions & 42 deletions .github/workflows/automerge.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<PropertyGroup>
<VersionMajor Condition="'$(VersionMajor)' == ''">1</VersionMajor>
<VersionMinor Condition="'$(VersionMinor)' == ''">4</VersionMinor>
<VersionPatch Condition="'$(VersionPatch)' == ''">2</VersionPatch>
<BuildNumber Condition="'$(BuildNumber)' == ''">102</BuildNumber>
<VersionMinor Condition="'$(VersionMinor)' == ''">6</VersionMinor>
<VersionPatch Condition="'$(VersionPatch)' == ''">0</VersionPatch>
<BuildNumber Condition="'$(BuildNumber)' == ''">103</BuildNumber>
<VersionSuffix Condition="'$(Configuration)' == 'Debug' and '$(VersionSuffix)' == ''">dev</VersionSuffix>
<Authors>gfoidl</Authors>
<Company>Foidl Günther</Company>
Expand Down
9 changes: 6 additions & 3 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,13 @@ E.g. in CircleCI you need to run
echo 'export PATH="$PATH:/root/.dotnet/tools"' >> "$BASH_ENV"
```

### Prequisites

[.NET Core SDK](https://dotnet.microsoft.com/download) 2.1 onwards.
### Prequisites / Supported SDKs

In order to install this tool a [.NET SDK](https://dotnet.microsoft.com/download/dotnet) must be present. Supported SDKs are:
* .NET 6.0
* .NET 5.0
* .NET Core 3.1
* .NET Core 2.1

## Development channel

Expand Down
4 changes: 2 additions & 2 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<Import Project="../Directory.Build.props" />

<PropertyGroup>
<SampleTfm>net5.0</SampleTfm>
<SampleTfm>net6.0</SampleTfm>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions samples/MsTestSample/MsTestSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
<PackageReference Include="MSTest.TestAdapter" Version="2.2.7" />
<PackageReference Include="MSTest.TestFramework" Version="2.2.7" />
</ItemGroup>

</Project>
7 changes: 5 additions & 2 deletions samples/NUnitSample/NUnitSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private void WriteTestDefinitions()
new XElement(s_XN + "Execution", new XAttribute("id", trxTestDefinition.ExecutionId!)),
new XElement(s_XN + "TestMethod",
new XAttribute("className", trxTestDefinition.TestClass!),
new XAttribute("name" , trxTestDefinition.TestMethod),
new XAttribute("name" , trxTestDefinition.TestMethod!),
new XAttribute("codeBase" , "not available")
)
));
Expand Down
2 changes: 1 addition & 1 deletion source/trx2junit/trx2junit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
13 changes: 11 additions & 2 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@
<Import Project="../Directory.Build.props" />

<PropertyGroup>
<TestTfm>net5.0;netcoreapp3.1;netcoreapp2.1</TestTfm>
<TestTfm>net6.0;net5.0;netcoreapp3.1;netcoreapp2.1</TestTfm>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.0" />
<PackageReference Include="coverlet.msbuild" Version="3.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit3TestAdapter" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

</Project>
11 changes: 1 addition & 10 deletions tests/trx2junit.Tests/trx2junit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.9.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.15.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Moq" Version="4.16.1" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions trx2junit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{8819C279-C1A2-420B-A1FD-28F4097EC41C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{A21A387B-90BB-45B0-AD48-240B86DA1FE9}"
ProjectSection(SolutionItems) = preProject
.github\workflows\automerge.yml = .github\workflows\automerge.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".azure", ".azure", "{5101A9AB-5CCE-4A20-AEA5-432BD2E4D9D2}"
EndProject
Expand Down

0 comments on commit 46a5a77

Please sign in to comment.