Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

FROM mcr.microsoft.com/dotnet/sdk:8.0
FROM mcr.microsoft.com/dotnet/sdk:10.0

RUN pwsh --command Install-Module platyPS,Pester -Force
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json
{
"name": "C# (.NET 8.0)",
"name": "C# (.NET 10.0)",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageVersion Include="Pluralize.NET" Version="1.0.2" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<!-- Please update minimumPowerShellCoreVersion in PSScriptAnalyzer.psm1 when updating below SMA major or minor version (but not patch) for better user-facing error message -->
<PackageVersion Include="System.Management.Automation" Version="7.4.14" />
<PackageVersion Include="System.Management.Automation" Version="7.6.9" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
</ItemGroup>
</Project>
10 changes: 5 additions & 5 deletions Engine/Engine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
<TargetFrameworks>net8;net462</TargetFrameworks>
<TargetFrameworks>net10.0;net462</TargetFrameworks>
<AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer</AssemblyName>
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
<PackageId>Engine</PackageId>
Expand All @@ -18,11 +18,11 @@
<DebugType>portable</DebugType>
</PropertyGroup>

<PropertyGroup Condition=" '$(TargetFramework)' == 'net8' ">
<PropertyGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<DefineConstants>$(DefineConstants);CORECLR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<Compile Remove="SafeDirectoryCatalog.cs" />
</ItemGroup>

Expand Down Expand Up @@ -69,10 +69,10 @@
</PropertyGroup>


<ItemGroup Condition="'$(TargetFramework)' == 'net8'">
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="System.Management.Automation" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net8'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Engine/PSScriptAnalyzer.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ $PSModuleRoot = $PSModule.ModuleBase

# Import the appropriate nested binary module based on the current PowerShell version
$binaryModuleRoot = $PSModuleRoot
# This should be the equivalent of 7.4.x i.e. latest major/minor supported but lowest patch.
[Version] $minimumPowerShellCoreVersion = '7.4.6'
# Keep this aligned with the oldest supported PowerShell 7.6 patch.
[Version] $minimumPowerShellCoreVersion = '7.6.6'
if ($PSVersionTable.PSVersion.Major -ge 6) {
$binaryModuleRoot = Join-Path -Path $PSModuleRoot -ChildPath "PSv$($PSVersionTable.PSVersion.Major)"
# Minimum PowerShell Core version given by PowerShell Core support itself and
Expand Down
12 changes: 12 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,17 @@
<packageSources>
<clear />
<add key="PowerShellCore_PublicPackages" value="https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v3/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceMapping>
<packageSource key="PowerShellCore_PublicPackages">
<package pattern="*" />
</packageSource>
<packageSource key="nuget.org">
<package pattern="System.Management.Automation" />
<package pattern="Microsoft.NETCore.App.Ref" />
<package pattern="Microsoft.AspNetCore.App.Ref" />
Comment thread
Copilot marked this conversation as resolved.
<package pattern="Microsoft.WindowsDesktop.App.Ref" />
</packageSource>
</packageSourceMapping>
</configuration>
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ To install **PSScriptAnalyzer** from source code:

### Requirements

- [Latest .NET 8.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/8.0)
- [Latest .NET 10.0 SDK](https://dotnet.microsoft.com/en-us/download/dotnet/10.0)
- If building for Windows PowerShell versions, then the .NET Framework 4.6.2 [targeting pack](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net462) (also referred to as developer/targeting pack) need to be installed. This is only possible on Windows.
- Optional but recommended for development: [Visual Studio 2022](https://www.visualstudio.com/downloads)
- Optional but recommended for development: [Visual Studio](https://www.visualstudio.com/downloads)
- Or [Visual Studio Code](https://code.visualstudio.com/download)
- [Pester v6 PowerShell module, available on PowerShell Gallery](https://github.com/pester/Pester)
- [PlatyPS PowerShell module, available on PowerShell Gallery](https://github.com/PowerShell/platyPS/releases)
Expand Down
6 changes: 3 additions & 3 deletions Rules/Rules.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
<TargetFrameworks>net8;net462</TargetFrameworks>
<TargetFrameworks>net10.0;net462</TargetFrameworks>
<AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules</AssemblyName>
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
<PackageId>Rules</PackageId>
Expand All @@ -16,7 +16,7 @@

</ItemGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net8' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net10.0' ">
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Reflection.TypeExtensions" />
<PackageReference Include="Microsoft.Management.Infrastructure" />
Expand Down Expand Up @@ -53,7 +53,7 @@
<CoreCompileDependsOn>PrepareResources;$(CompileDependsOn)</CoreCompileDependsOn>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net8'">
<PropertyGroup Condition="'$(TargetFramework)' == 'net10.0'">
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion build.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function Start-ScriptAnalyzerBuild

$framework = 'net462'
if ($PSVersion -eq 7) {
$framework = 'net8'
$framework = 'net10.0'
}

Push-Location -Path $projectRoot
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "8.0.419",
"version": "10.0.401",
"rollForward": "latestFeature"
}
}
Loading