Skip to content

Commit

Permalink
Update to net8 and newer dep
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Dec 12, 2024
1 parent 0ecf29a commit be8f8f8
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 382 deletions.
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"rollForward": "latestFeature",
"rollForward": "latestMajor",
"version": "8.0.100",
"allowPrerelease": false
}
Expand Down
14 changes: 5 additions & 9 deletions src/csharp/Pester/Pester.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net462</TargetFrameworks>
<LangVersion>latest</LangVersion>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<DebugType>embedded</DebugType>
Expand All @@ -11,14 +11,10 @@
<DefineConstants>$(DefineConstants);PESTER</DefineConstants>
</PropertyGroup>

<!-- PowerShell 7.2.x is the oldest supported PowerShell version. That version is built using net6.0.
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:
https://github.com/PowerShell/PowerShell/issues/16408
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,
-->
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<PackageReference Include="System.Management.Automation" Version="7.1.7" />
<!-- PowerShell 7.4.x is the oldest supported PowerShell version. That version is built using net8.0. -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<!-- Versions older than 7.4.6 have security vulnerabilities. -->
<PackageReference Include="System.Management.Automation" Version="7.4.6" />
</ItemGroup>

<!-- Windows PowerShell 5.1 is the only Windows PowerShell that is still in support, and it is built using .NET Framework 4.5.2.
Expand Down
238 changes: 74 additions & 164 deletions src/csharp/Pester/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,250 +23,160 @@
"contentHash": "ONGjkFWduK13lfxUtlEl4+nYwrqDe5NF5f8qRtp5fqWiWYlqft/Ko9ht3e6Secg9y3I1yL8Xnfag/JGOOn0yoQ=="
}
},
"net6.0": {
"net8.0": {
"System.Management.Automation": {
"type": "Direct",
"requested": "[7.1.7, )",
"resolved": "7.1.7",
"contentHash": "BfZzmGkMdWJojuF0daovfh9GmhTg0gYr5mXSSdnwpZHaIQG5kx+4/tMNzBxf4x5uvlcvCiAaQFSHRoigpDZoog==",
"dependencies": {
"Microsoft.ApplicationInsights": "2.15.0",
"Microsoft.Management.Infrastructure": "2.0.0",
"Microsoft.PowerShell.CoreCLR.Eventing": "7.1.7",
"Microsoft.PowerShell.Native": "7.1.0",
"Microsoft.Win32.Registry.AccessControl": "5.0.0",
"Newtonsoft.Json": "12.0.3",
"System.Configuration.ConfigurationManager": "5.0.0",
"System.DirectoryServices": "5.0.0",
"System.IO.FileSystem.AccessControl": "5.0.0",
"System.Management": "5.0.0",
"System.Runtime.CompilerServices.Unsafe": "5.0.0",
"System.Security.AccessControl": "5.0.0",
"System.Security.Cryptography.Pkcs": "5.0.1",
"System.Security.Permissions": "5.0.0",
"System.Text.Encoding.CodePages": "5.0.0"
"requested": "[7.4.6, )",
"resolved": "7.4.6",
"contentHash": "RxrDUOJuLC7Sd2RaUHf52ujP5VpdfSVTv75nwgEVAROCfYV4IcSd5mL4mLrKa+6LjkXGli7aUs853UyCwidl1A==",
"dependencies": {
"Microsoft.ApplicationInsights": "2.21.0",
"Microsoft.Management.Infrastructure": "3.0.0",
"Microsoft.PowerShell.CoreCLR.Eventing": "7.4.6",
"Microsoft.PowerShell.Native": "7.4.0",
"Microsoft.Security.Extensions": "1.2.0",
"Microsoft.Win32.Registry.AccessControl": "8.0.0",
"Newtonsoft.Json": "13.0.3",
"System.Configuration.ConfigurationManager": "8.0.1",
"System.Diagnostics.DiagnosticSource": "8.0.1",
"System.DirectoryServices": "8.0.0",
"System.Formats.Asn1": "8.0.1",
"System.Management": "8.0.0",
"System.Security.AccessControl": "6.0.1",
"System.Security.Cryptography.Pkcs": "8.0.1",
"System.Security.Permissions": "8.0.0",
"System.Text.Encoding.CodePages": "8.0.0"
}
},
"Microsoft.ApplicationInsights": {
"type": "Transitive",
"resolved": "2.15.0",
"contentHash": "tG9WZoFc0BTbkj+UjH4IUp8qkT9NA5st8zvPzlHbU8rJDgPFqZDJ3SSAQajl42jet1ghhJ5ZixsjjqVvwi4kaQ==",
"resolved": "2.21.0",
"contentHash": "btZEDWAFNo9CoYliMCriSMTX3ruRGZTtYw4mo2XyyfLlowFicYVM2Xszi5evDG95QRYV7MbbH3D2RqVwfZlJHw==",
"dependencies": {
"System.Diagnostics.DiagnosticSource": "4.6.0",
"System.Memory": "4.5.4"
"System.Diagnostics.DiagnosticSource": "5.0.0"
}
},
"Microsoft.Management.Infrastructure": {
"type": "Transitive",
"resolved": "2.0.0",
"contentHash": "IaKZRNBBv3sdrmBWd+aqwHq8cVHk/3WgWFAN/dt40MRY9rbtHiDfTTmaEN0tGTmQqGCGDo/ncntA8MvFMvcsRw==",
"resolved": "3.0.0",
"contentHash": "cGZi0q5IujCTVYKo9h22Pw+UwfZDV82HXO8HTxMG2HqntPlT3Ls8jY6punLp4YzCypJNpfCAu2kae3TIyuAiJw==",
"dependencies": {
"Microsoft.Management.Infrastructure.Runtime.Unix": "2.0.0",
"Microsoft.Management.Infrastructure.Runtime.Win": "2.0.0"
"Microsoft.Management.Infrastructure.Runtime.Unix": "3.0.0",
"Microsoft.Management.Infrastructure.Runtime.Win": "3.0.0"
}
},
"Microsoft.Management.Infrastructure.Runtime.Unix": {
"type": "Transitive",
"resolved": "2.0.0",
"contentHash": "p0lslMX5bdWLxO2P7ao+rjAMOB0LEwPYpzvdCQ2OEYgX2NxFpQ8ILvqPGnYlTAb53rT8gu5DyIol1HboHFYfxQ=="
"resolved": "3.0.0",
"contentHash": "QZE3uEDvZ0m7LabQvcmNOYHp7v1QPBVMpB/ild0WEE8zqUVAP5y9rRI5we37ImI1bQmW5pZ+3HNC70POPm0jBQ=="
},
"Microsoft.Management.Infrastructure.Runtime.Win": {
"type": "Transitive",
"resolved": "2.0.0",
"contentHash": "vjBWQeDOjgernkrOdbEgn7M70SF7hof7ORdKPSlL06Uc15+oYdth5dZju9KsgUoti/cwnkZTiwtDx/lRtay0sA=="
},
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "z3YFkbnl1RMj6lb+Bm/2tsZ0cJCULlB4uPOFqlj6dNSm/8feJl4UrXmG6TcZh8ipJQwkAS5I6UCs1FnGog4QZg=="
"resolved": "3.0.0",
"contentHash": "uwMyWN33+iQ8Wm/n1yoPXgFoiYNd0HzJyoqSVhaQZyJfaQrJR3udgcIHjqa1qbc3lS6kvfuUMN4TrF4U4refCQ=="
},
"Microsoft.PowerShell.CoreCLR.Eventing": {
"type": "Transitive",
"resolved": "7.1.7",
"contentHash": "XetnSjvu81UJqmj0+ugMwi1vFPZS/0FJwckZ5e3B6+HZeR9/sKPx3BbwDzrbmZ4EyBMyCp3WF1ISQZeRb7Y2lA==",
"resolved": "7.4.6",
"contentHash": "z8XYESoGwJYT/L60192dE+n1dS7HRvbh2VinadhD3/zA6fDC/lu0VhQc42c56K4JiIMsLfHUUtaPJEa1JPaNBg==",
"dependencies": {
"System.Diagnostics.EventLog": "5.0.1"
"System.Diagnostics.EventLog": "8.0.1"
}
},
"Microsoft.PowerShell.Native": {
"type": "Transitive",
"resolved": "7.1.0",
"contentHash": "PJ/ei1HnYC+CMVDdUMT96PgWFONwVv/ZaJ5j//qLdk073alzdzOPWZiGsxYimJaRLP0TW4uomgIsR9q6jrf48A=="
"resolved": "7.4.0",
"contentHash": "FlaJ3JBWhqFToYT0ycMb/Xxzoof7oTQbNyI4UikgubC7AMWt5ptBNKjIAMPvOcvEHr+ohaO9GvRWp3tiyS3sKw=="
},
"Microsoft.Win32.Registry": {
"Microsoft.Security.Extensions": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dDoKi0PnDz31yAyETfRntsLArTlVAVzUzCIvvEDsDsucrl33Dl8pIJG06ePTJTI3tGpeyHS9Cq7Foc/s4EeKcg==",
"dependencies": {
"System.Security.AccessControl": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
"resolved": "1.2.0",
"contentHash": "GjHZBE5PHKrxPRyGujWQKwbKNjPQYds6HcAWKeV49X3KPgBfF2B1vV5uJey5UluyGQlvAO/DezL7WzEx9HlPQA=="
},
"Microsoft.Win32.Registry.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "rwF501ZS/xKGWz5H3RLBvwta6E5kcMLB0UYGTgrZ8nL5bvrbGmtEcEObgMC/qRFhA3og/0Zh+eacrcA+0FBXJA==",
"dependencies": {
"Microsoft.Win32.Registry": "5.0.0",
"System.Security.AccessControl": "5.0.0"
}
},
"Microsoft.Win32.SystemEvents": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "Bh6blKG8VAKvXiLe2L+sEsn62nc1Ij34MrNxepD2OCrS5cpCwQa9MeLyhVQPQ/R4Wlzwuy6wMK8hLb11QPDRsQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
}
"resolved": "8.0.0",
"contentHash": "u8PB9/v02C8mBXzl0vJ7bOyC020zOP+T1mRct+KA46DqZkB40XtsNn9pGD0QowTRsT6R4jPCghn+yAODn2UMMw=="
},
"Newtonsoft.Json": {
"type": "Transitive",
"resolved": "12.0.3",
"contentHash": "6mgjfnRB4jKMlzHSl+VD+oUc1IebOZabkbyWj2RiTgWwYPPuaK1H97G1sHqGwPlS5npiF5Q0OrxN1wni2n5QWg=="
"resolved": "13.0.3",
"contentHash": "HrC5BXdl00IP9zeV+0Z848QWPAoCr9P3bDEZguI+gkLcBKAOxix/tLEAAHC+UvDNPv4a2d18lOReHMOagPa+zQ=="
},
"System.CodeDom": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "JPJArwA1kdj8qDAkY2XGjSWoYnqiM7q/3yRNkt6n28Mnn95MuEGkZXUbPBf7qc3IjwrGY5ttQon7yqHZyQJmOQ=="
"resolved": "8.0.0",
"contentHash": "WTlRjL6KWIMr/pAaq3rYqh0TJlzpouaQ/W1eelssHgtlwHAH25jXTkUphTYx9HaIIf7XA6qs/0+YhtLEQRkJ+Q=="
},
"System.Configuration.ConfigurationManager": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "aM7cbfEfVNlEEOj3DsZP+2g9NRwbkyiAv2isQEzw7pnkDg9ekCU2m1cdJLM02Uq691OaCS91tooaxcEn8d0q5w==",
"resolved": "8.0.1",
"contentHash": "gPYFPDyohW2gXNhdQRSjtmeS6FymL2crg4Sral1wtvEJ7DUqFCDWDVbbLobASbzxfic8U1hQEdC7hmg9LHncMw==",
"dependencies": {
"System.Security.Cryptography.ProtectedData": "5.0.0",
"System.Security.Permissions": "5.0.0"
"System.Diagnostics.EventLog": "8.0.1",
"System.Security.Cryptography.ProtectedData": "8.0.0"
}
},
"System.Diagnostics.DiagnosticSource": {
"type": "Transitive",
"resolved": "4.6.0",
"contentHash": "mbBgoR0rRfl2uimsZ2avZY8g7Xnh1Mza0rJZLPcxqiMWlkGukjmRkuMJ/er+AhQuiRIh80CR/Hpeztr80seV5g=="
"resolved": "8.0.1",
"contentHash": "vaoWjvkG1aenR2XdjaVivlCV9fADfgyhW5bZtXT23qaEea0lWiUljdQuze4E31vKM7ZWJaSUsbYIKE3rnzfZUg=="
},
"System.Diagnostics.EventLog": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "k4O5RrjnhJZrP4EgOklUVkcmVdAxs9+PoXCGmlNS3NPIwaSyMMLy7pUaamMHCFkduiOO/ZUzIRjyoCnvXLJpfw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.1",
"Microsoft.Win32.Registry": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
"resolved": "8.0.1",
"contentHash": "n1ZP7NM2Gkn/MgD8+eOT5MulMj6wfeQMNS2Pizvq5GHCZfjlFMXV2irQlQmJhwA2VABC57M0auudO89Iu2uRLg=="
},
"System.DirectoryServices": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "lAS54Y3KO1XV68akGa0/GJeddkkuuiv2CtcSkMiTmLHQ6o6kFbKpw4DmJZADF7a6KjPwYxmZnH4D3eGicrJdcg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.IO.FileSystem.AccessControl": "5.0.0",
"System.Security.AccessControl": "5.0.0",
"System.Security.Permissions": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
"System.Drawing.Common": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "SztFwAnpfKC8+sEKXAFxCBWhKQaEd97EiOL7oZJZP56zbqnLpmxACWA8aGseaUExciuEAUuR9dY8f7HkTRAdnw==",
"dependencies": {
"Microsoft.Win32.SystemEvents": "5.0.0"
}
"resolved": "8.0.0",
"contentHash": "7nit//efUTy1OsAKco2f02PMrwsR2S234N0dVVp84udC77YcvpOQDz5znAWMtgMWBzY1aRJvUW61jo/7vQRfXg=="
},
"System.Formats.Asn1": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "MTvUIktmemNB+El0Fgw9egyqT9AYSIk6DTJeoDSpc3GIHxHCMo8COqkWT1mptX5tZ1SlQ6HJZ0OsSvMth1c12w=="
},
"System.IO.FileSystem.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "SxHB3nuNrpptVk+vZ/F+7OHEpoHUIKKMl02bUmYHQr1r+glbZQxs7pRtsf4ENO29TVm2TH3AEeep2fJcy92oYw==",
"dependencies": {
"System.Security.AccessControl": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
"resolved": "8.0.1",
"contentHash": "XqKba7Mm/koKSjKMfW82olQdmfbI5yqeoLV/tidRp7fbh5rmHAQ5raDI/7SU0swTzv+jgqtUGkzmFxuUg0it1A=="
},
"System.Management": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "MF1CHaRcC+MLFdnDthv4/bKWBZnlnSpkGqa87pKukQefgEdwtb9zFW6zs0GjPp73qtpYYg4q6PEKbzJbxCpKfw==",
"resolved": "8.0.0",
"contentHash": "jrK22i5LRzxZCfGb+tGmke2VH7oE0DvcDlJ1HAKYU8cPmD8XnpUT0bYn2Gy98GEhGjtfbR/sxKTVb+dE770pfA==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"Microsoft.Win32.Registry": "5.0.0",
"System.CodeDom": "5.0.0"
"System.CodeDom": "8.0.0"
}
},
"System.Memory": {
"type": "Transitive",
"resolved": "4.5.4",
"contentHash": "1MbJTHS1lZ4bS4FmsJjnuGJOu88ZzTT2rLvrhW7Ygic+pC0NWA+3hgAen0HRdsocuQXCkUTdFn9yHJJhsijDXw=="
},
"System.Runtime.CompilerServices.Unsafe": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "ZD9TMpsmYJLrxbbmdvhwt9YEgG5WntEnZ/d1eH8JBX9LBp+Ju8BSBhUGbZMNVHHomWo2KVImJhTDl2hIgw/6MA=="
},
"System.Security.AccessControl": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "dagJ1mHZO3Ani8GH0PHpPEe/oYO+rVdbQjvjJkBRNQkX4t0r1iaeGn8+/ybkSLEan3/slM0t59SVdHzuHf2jmw==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0",
"System.Security.Principal.Windows": "5.0.0"
}
},
"System.Security.Cryptography.Cng": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "jIMXsKn94T9JY7PvPq/tMfqa6GAaHpElRDpmG+SuL+D3+sTw2M8VhnibKnN8Tq+4JqbPJ/f+BwtLeDMEnzAvRg==",
"dependencies": {
"System.Formats.Asn1": "5.0.0"
}
"resolved": "6.0.1",
"contentHash": "IQ4NXP/B3Ayzvw0rDQzVTYsCKyy0Jp9KI6aYcK7UnGVlR9+Awz++TIPCQtPYfLJfOpm8ajowMR09V7quD3sEHw=="
},
"System.Security.Cryptography.Pkcs": {
"type": "Transitive",
"resolved": "5.0.1",
"contentHash": "9ualfJXOMrjW/E4z73cGHVcAvFMCCnMZQE+8xME9eX70bTZ0UAJCstG0khsMvL8B+9c9qw+ktowt1fN0BffMnQ==",
"dependencies": {
"System.Formats.Asn1": "5.0.0",
"System.Security.Cryptography.Cng": "5.0.0"
}
"resolved": "8.0.1",
"contentHash": "CoCRHFym33aUSf/NtWSVSZa99dkd0Hm7OCZUxORBjRB16LNhIEOf8THPqzIYlvKM0nNDAPTRBa1FxEECrgaxxA=="
},
"System.Security.Cryptography.ProtectedData": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "HGxMSAFAPLNoxBvSfW08vHde0F9uh7BjASwu6JF9JnXuEPhCY3YUqURn0+bQV/4UWeaqymmrHWV+Aw9riQCtCA=="
"resolved": "8.0.0",
"contentHash": "+TUFINV2q2ifyXauQXRwy4CiBhqvDEDZeVJU7qfxya4aRYOKzVBpN+4acx25VcPB9ywUN6C0n8drWl110PhZEg=="
},
"System.Security.Permissions": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "uE8juAhEkp7KDBCdjDIE3H9R1HJuEHqeqX8nLX9gmYKWwsqk3T5qZlPx8qle5DPKimC/Fy3AFTdV7HamgCh9qQ==",
"resolved": "8.0.0",
"contentHash": "v/BBylw7XevuAsHXoX9dDUUfmBIcUf7Lkz8K3ZXIKz3YRKpw8YftpSir4n4e/jDTKFoaK37AsC3xnk+GNFI1Ow==",
"dependencies": {
"System.Security.AccessControl": "5.0.0",
"System.Windows.Extensions": "5.0.0"
"System.Windows.Extensions": "8.0.0"
}
},
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "t0MGLukB5WAVU9bO3MGzvlGnyJPgUlcwerXn1kzBRjwLKixT96XV0Uza41W49gVd8zEMFu9vQEFlv0IOrytICA=="
},
"System.Text.Encoding.CodePages": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "NyscU59xX6Uo91qvhOs2Ccho3AR2TnZPomo1Z0K6YpyztBPM/A5VbkzOO19sy3A3i1TtEnTxA7bCe3Us+r5MWg==",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
}
"resolved": "8.0.0",
"contentHash": "OZIsVplFGaVY90G2SbpgU7EnCoOO5pw1t4ic21dBF3/1omrJFpAGoNAVpPyMVOC90/hvgkGG3VFqR13YgZMQfg=="
},
"System.Windows.Extensions": {
"type": "Transitive",
"resolved": "5.0.0",
"contentHash": "c1ho9WU9ZxMZawML+ssPKZfdnrg/OjR3pe0m9v8230z3acqphwvPJqzAkH54xRYm5ntZHGG1EPP3sux9H3qSPg==",
"dependencies": {
"System.Drawing.Common": "5.0.0"
}
"resolved": "8.0.0",
"contentHash": "Obg3a90MkOw9mYKxrardLpY2u0axDMrSmy4JCdq2cYbelM2cUwmUir5Bomvd1yxmPL9h5LVHU1tuKBZpUjfASg=="
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions src/csharp/PesterTests/PesterTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.7" />
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit be8f8f8

Please sign in to comment.