Skip to content

Commit abee795

Browse files
fflatennohwnd
andauthored
Update PesterTests and devcontainer to .NET 8 (#2430)
* Update devcontainer to .NET 8 SDK * Add extensions for CI to devcontainer * Update contributing guide --------- Co-authored-by: Jakub Jareš <[email protected]>
1 parent 6466ee0 commit abee795

File tree

6 files changed

+69
-949
lines changed

6 files changed

+69
-949
lines changed

.devcontainer/Dockerfile

-10
This file was deleted.

.devcontainer/devcontainer.json

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or this file's README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.5/containers/dotnet
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
32
{
43
"name": "Pester",
5-
"build": {
6-
"dockerfile": "Dockerfile",
7-
"args": {
8-
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
9-
// Append -bullseye or -focal to pin to an OS version. Using focal (Ubuntu) for pwsh support
10-
"VARIANT": "6.0-focal"
4+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-jammy",
5+
"remoteUser": "vscode",
6+
"customizations": {
7+
"codespaces": {
8+
"openFiles": [
9+
"CONTRIBUTING.md"
10+
]
11+
},
12+
"vscode": {
13+
"settings": {},
14+
"extensions": [
15+
"ms-vscode.powershell",
16+
"ms-dotnettools.csharp",
17+
"redhat.vscode-xml",
18+
"ms-azure-devops.azure-pipelines",
19+
"GitHub.vscode-github-actions"
20+
]
1121
}
1222
},
13-
// Set *default* container specific settings.json values on container create.
14-
"settings": {},
15-
// Add the IDs of extensions you want installed when the container is created.
16-
"extensions": [
17-
"ms-vscode.powershell",
18-
"ms-dotnettools.csharp",
19-
"redhat.vscode-xml"
20-
],
21-
// Use 'postCreateCommand' to run commands after the container is created.
2223
// Restoring the c# projects
2324
"postCreateCommand": "dotnet restore src/csharp"
2425
}

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for more information.
88

99
## Building Pester
1010

11-
Pester is written in Powershell and C#. The C# solution requires .Net
11+
Pester is written in Powershell and C#. The C# solution requires .NET
1212
Framework SDKs and Developer Packs in order to compile, see links below
1313
how to install those prior to building.
1414

src/csharp/Pester/Pester.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<!-- PowerShell 7.2.x is the oldest supported PowerShell version. That version is built using net6.0.
1111
But there is a bug in 7.2.0 reference assemblies, up to 7.2.10, where the IExtens.File is missing from the reference assembly:
1212
https://github.com/PowerShell/PowerShell/issues/16408
13-
13+
1414
So we use the version released before 7.2.0 which was 7.1.7. We could probably use 7.2.10 safely as well,
1515
-->
1616
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">

src/csharp/PesterTests/PesterTests.csproj

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
<IsPackable>false</IsPackable>
77
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
8+
<!-- Workaround for NETSDK1206 warning about version-specific RIDs in
9+
Microsoft.Management.Infrastructure dependency. Resolved in PowerShell 7.4 SDK -->
10+
<UseRidGraph>true</UseRidGraph>
811
</PropertyGroup>
912

1013
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.2" />
12-
<PackageReference Include="xunit" Version="2.4.2" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
14-
<PackageReference Include="coverlet.collector" Version="3.1.2" />
14+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
15+
<PackageReference Include="xunit" Version="2.7.0" />
16+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7" />
17+
<PackageReference Include="coverlet.collector" Version="6.0.2" />
1518
</ItemGroup>
1619

1720
<ItemGroup>

0 commit comments

Comments
 (0)