diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index db3c43ddb..7bdf7a2b4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,6 +1,6 @@ { "name": "PnP PowerShell", - "image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0", + "image": "mcr.microsoft.com/devcontainers/dotnet:0-8.0", "features": { "ghcr.io/devcontainers/features/git:1": { "ppa": true, diff --git a/README.md b/README.md index ad298fa32..741f8313e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # PnP PowerShell -**PnP PowerShell** is a .NET 6 based PowerShell Module providing nearly 750 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. +**PnP PowerShell** is a .NET 8 based PowerShell Module providing nearly 750 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. Last version | Last nightly version -------------|--------------------- diff --git a/build/Build-Debug.ps1 b/build/Build-Debug.ps1 index 0743f5e00..cce45fd5d 100644 --- a/build/Build-Debug.ps1 +++ b/build/Build-Debug.ps1 @@ -35,7 +35,7 @@ else { $buildVersion = $versionObject.Patch + 1; } -$configuration = "net6.0-windows" +$configuration = "net8.0-windows" $version = "$($versionObject.Major).$($versionObject.Minor).$buildVersion" @@ -113,7 +113,7 @@ if ($LASTEXITCODE -eq 0) { $commonFiles = [System.Collections.Generic.Hashset[string]]::new() Copy-Item -Path "$PSScriptRoot/../resources/*.ps1xml" -Destination "$destinationFolder" - Get-ChildItem -Path "$PSScriptRoot/../src/ALC/bin/Debug/net6.0" | Where-Object { $_.Extension -in '.dll', '.pdb' } | Foreach-Object { if (!$assemblyExceptions.Contains($_.Name)) { [void]$commonFiles.Add($_.Name) }; Copy-Item -LiteralPath $_.FullName -Destination $commonPath } + Get-ChildItem -Path "$PSScriptRoot/../src/ALC/bin/Debug/net8.0" | Where-Object { $_.Extension -in '.dll', '.pdb' } | Foreach-Object { if (!$assemblyExceptions.Contains($_.Name)) { [void]$commonFiles.Add($_.Name) }; Copy-Item -LiteralPath $_.FullName -Destination $commonPath } Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Debug/$configuration" | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $corePath } } Catch { diff --git a/build/Build-Nightly.ps1 b/build/Build-Nightly.ps1 index 2e9b23de8..d6bd68faa 100644 --- a/build/Build-Nightly.ps1 +++ b/build/Build-Nightly.ps1 @@ -111,11 +111,11 @@ if ($runPublish -eq $true) { $commonFiles = [System.Collections.Generic.Hashset[string]]::new() Copy-Item -Path "$PSscriptRoot/../resources/*.ps1xml" -Destination "$destinationFolder" - Get-ChildItem -Path "$PSScriptRoot/../src/ALC/bin/Release/net6.0" | Where-Object { $_.Extension -in '.dll', '.pdb' } | Foreach-Object { if (!$assemblyExceptions.Contains($_.Name)) { [void]$commonFiles.Add($_.Name) }; Copy-Item -LiteralPath $_.FullName -Destination $commonPath } - Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows" | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $corePath } - Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-x64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathWin64 } - Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-arm64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathArm64 } - Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net6.0-windows/runtimes/win-x86/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathx86 } + Get-ChildItem -Path "$PSScriptRoot/../src/ALC/bin/Release/net8.0" | Where-Object { $_.Extension -in '.dll', '.pdb' } | Foreach-Object { if (!$assemblyExceptions.Contains($_.Name)) { [void]$commonFiles.Add($_.Name) }; Copy-Item -LiteralPath $_.FullName -Destination $commonPath } + Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net8.0-windows" | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $corePath } + Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net8.0-windows/runtimes/win-x64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathWin64 } + Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net8.0-windows/runtimes/win-arm64/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathArm64 } + Get-ChildItem -Path "$PSScriptRoot/../src/Commands/bin/Release/net8.0-windows/runtimes/win-x86/native" -Recurse | Where-Object { $_.Extension -in '.dll', '.pdb' -and -not $commonFiles.Contains($_.Name) } | Foreach-Object { Copy-Item -LiteralPath $_.FullName -Destination $coreRuntimePathx86 } } Catch { Write-Host "Error: Cannot copy files to $destinationFolder. Maybe a PowerShell session is still using the module?" diff --git a/docker/hub.docker.md b/docker/hub.docker.md index 6dc00c92c..e59449dc1 100644 --- a/docker/hub.docker.md +++ b/docker/hub.docker.md @@ -2,7 +2,7 @@ ![PnP PowerShell](https://repository-images.githubusercontent.com/296298081/933a6d00-072b-11eb-839d-56df16c29588) -**PnP PowerShell** is a .NET 6 / .NET Framework 4.6.2 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. +**PnP PowerShell** is a .NET 8 / .NET Framework 4.6.2 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. Last version | Last nightly version -------------|--------------------- @@ -24,7 +24,7 @@ Last version | Last nightly version ## About this image -**PnP PowerShell** is a .NET 6 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. +**PnP PowerShell** is a .NET 8 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. ## Usage examples diff --git a/docker/pnppowershell.dockerFile b/docker/pnppowershell.dockerFile index 2d89d6f6e..dd47ee1a8 100644 --- a/docker/pnppowershell.dockerFile +++ b/docker/pnppowershell.dockerFile @@ -1,5 +1,5 @@ ARG BASE_IMAGE_SUFFIX=alpine-3.17 -ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-7.2-$BASE_IMAGE_SUFFIX +ARG BASE_IMAGE=mcr.microsoft.com/powershell:lts-7.4-$BASE_IMAGE_SUFFIX FROM $BASE_IMAGE SHELL ["pwsh", "-command"] diff --git a/documentation/Convert-PnPSiteTemplate.md b/documentation/Convert-PnPSiteTemplate.md index 31d18e1f3..8eba92881 100644 --- a/documentation/Convert-PnPSiteTemplate.md +++ b/documentation/Convert-PnPSiteTemplate.md @@ -122,4 +122,4 @@ Accept wildcard characters: False ## RELATED LINKS [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) -[Encoding documentation](https://learn.microsoft.com/dotnet/api/system.text.encoding?view=net-6.0) \ No newline at end of file +[Encoding documentation](https://learn.microsoft.com/dotnet/api/system.text.encoding?view=net-8.0) \ No newline at end of file diff --git a/documentation/Get-PnPSiteTemplate.md b/documentation/Get-PnPSiteTemplate.md index e46242ab5..f153ea23d 100644 --- a/documentation/Get-PnPSiteTemplate.md +++ b/documentation/Get-PnPSiteTemplate.md @@ -644,4 +644,4 @@ Accept wildcard characters: False ## RELATED LINKS [Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) -[Encoding documentation](https://learn.microsoft.com/dotnet/api/system.text.encoding?view=net-6.0) +[Encoding documentation](https://learn.microsoft.com/dotnet/api/system.text.encoding?view=net-8.0) diff --git a/pages/articles/azureautomationrunbook.md b/pages/articles/azureautomationrunbook.md index f1b2325f1..410839aa2 100644 --- a/pages/articles/azureautomationrunbook.md +++ b/pages/articles/azureautomationrunbook.md @@ -43,7 +43,7 @@ To add PnP PowerShell to the Azure Automation Account, follow these steps: #### Specific stable version > [!Important] - > Currently stable PnP PowerShell version that works with Azure Automation 7.2 Runbooks is **2.1.1**. + > Currently stable PnP PowerShell version that works with Azure Automation 7.2 Runbooks is **2.12.0**. > If you would like to use a [latest nightly build](#latest-prerelease-version) instead, use the below instructions Select **Browse from gallery**, Runtime version **7.2 (preview)** and click on the **Click here to browse from gallery** link diff --git a/pages/articles/azurefunctions.md b/pages/articles/azurefunctions.md index fe4a735d1..31c75c39e 100644 --- a/pages/articles/azurefunctions.md +++ b/pages/articles/azurefunctions.md @@ -17,9 +17,9 @@ As the UI in [the Azure Portal](https://portal.azure.com) changes every now and ![Creating a function app resource](./../images/azurefunctions/createfunctionappresource.png) -1. Choose runtime stack `PowerShell Core` and version `7.2` (7.0 is not longer an option as of December 3rd, 2022) +1. Choose runtime stack `PowerShell Core` and version `7.4` (7.0 is not longer an option as of December 3rd, 2022) - ![Create function app basics](./../images/azurefunctions/createfunctionappbasics.png) + ![Create function app basics](./../images/azurefunctions/createfunctionappbasics2.png) 1. Select `Windows` as the operating system or else you will not be able to perform the following steps from your browser. diff --git a/pages/articles/gettingstartedcontributing.md b/pages/articles/gettingstartedcontributing.md index c3616cec2..fca4b3f4d 100644 --- a/pages/articles/gettingstartedcontributing.md +++ b/pages/articles/gettingstartedcontributing.md @@ -36,13 +36,13 @@ PnP PowerShell only runs on PowerShell 7. If you don't have it installed yet, fo ![Installation of PowerShell 7 done](./../images/contributing/installps7done.png) -## Installing the .NET SDK 6 +## Installing the .NET SDK 8 -To be able to compile the PnP PowerShell code, you need to have the .NET SDK 6 installed. If you don't have it installed yet, follow the steps below to install it. If you already have it installed, you can skip to the next paragraph. +To be able to compile the PnP PowerShell code, you need to have the .NET SDK 8 installed. If you don't have it installed yet, follow the steps below to install it. If you already have it installed, you can skip to the next paragraph. -1. Navigate to the [.NET SDK 6 download page](https://dotnet.microsoft.com/download/dotnet/6.0) and download the latest version of the .NET SDK 6. It is available for Windows, Linux and Mac. +1. Navigate to the [.NET SDK 8 download page](https://dotnet.microsoft.com/download/dotnet/8.0) and download the latest version of the .NET SDK 8. It is available for Windows, Linux and Mac. - ![Installing .NET SDK 6](./../images/contributing/dotnetsdk.png) + ![Installing .NET SDK 8](./../images/contributing/dotnetsdk.png) 1. You can accept all the defaults and just do a next-next-finish installation. diff --git a/pages/articles/installation.md b/pages/articles/installation.md index 486ba973a..cb67f4e08 100644 --- a/pages/articles/installation.md +++ b/pages/articles/installation.md @@ -1,6 +1,6 @@ # Installing PnP PowerShell -You need PowerShell 7.2 or later to use PnP PowerShell. It is available for Windows, Linux and Mac and can be [installed through here](https://learn.microsoft.com/powershell/scripting/install/installing-powershell). +You need PowerShell 7.4 or later to use PnP PowerShell. It is available for Windows, Linux and Mac and can be [installed through here](https://learn.microsoft.com/powershell/scripting/install/installing-powershell). ## Stable build @@ -23,7 +23,7 @@ Install-Module PnP.PowerShell -Scope CurrentUser -AllowPrerelease -SkipPublisher To use PnP.PowerShell in a Windows container: ```powershell -docker run -it m365pnp/powershell:1.10.0-nanoserver-1809 +docker run -it m365pnp/powershell:2.12.0-nanoserver-1809 ``` To use PnP.PowerShell in a Linux container: @@ -34,7 +34,7 @@ docker run -it m365pnp/powershell # Updating PnP PowerShell -If you already have PnP PowerShell installed and just want to update to the latest version you can follow these steps. If you're not sure if your version is already up to date, it does no harm to run it anyway. If there's no new version available, it will not do anything. You need PowerShell 7.2 or later to use PnP PowerShell. It is available for Windows, Linux and Mac and can be [installed through here](https://learn.microsoft.com/powershell/scripting/install/installing-powershell). +If you already have PnP PowerShell installed and just want to update to the latest version you can follow these steps. If you're not sure if your version is already up to date, it does no harm to run it anyway. If there's no new version available, it will not do anything. You need PowerShell 7.4 or later to use PnP PowerShell. It is available for Windows, Linux and Mac and can be [installed through here](https://learn.microsoft.com/powershell/scripting/install/installing-powershell). ## Stable build diff --git a/pages/images/azurefunctions/createfunctionappbasics2.png b/pages/images/azurefunctions/createfunctionappbasics2.png new file mode 100644 index 000000000..7a452bfc7 Binary files /dev/null and b/pages/images/azurefunctions/createfunctionappbasics2.png differ diff --git a/src/ALC/PnP.PowerShell.ALC.csproj b/src/ALC/PnP.PowerShell.ALC.csproj index c61e17a5f..a6f03847b 100644 --- a/src/ALC/PnP.PowerShell.ALC.csproj +++ b/src/ALC/PnP.PowerShell.ALC.csproj @@ -1,13 +1,13 @@  - net6.0 + net8.0 true Debug;Release;DebugLocal - + diff --git a/src/Commands/Base/PnPPowerShellModuleInitializer.cs b/src/Commands/Base/PnPPowerShellModuleInitializer.cs index 63eac5125..0dfef9373 100644 --- a/src/Commands/Base/PnPPowerShellModuleInitializer.cs +++ b/src/Commands/Base/PnPPowerShellModuleInitializer.cs @@ -22,7 +22,7 @@ static PnPPowerShellModuleInitializer() s_binCommonPath = Path.Combine(Path.GetDirectoryName(s_binBasePath), "Common"); if (Environment.GetEnvironmentVariable("PNP_PS_DEBUG_IN_VISUAL_STUDIO") == "True") { - s_binCommonPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..", "..", "..", "..", "..", "src", "ALC", "bin", "Debug", "net6.0")); + s_binCommonPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "..", "..", "..", "..", "..", "src", "ALC", "bin", "Debug", "net8.0")); } s_dependencies = new HashSet(StringComparer.Ordinal); diff --git a/src/Commands/PnP.PowerShell.csproj b/src/Commands/PnP.PowerShell.csproj index f4cf286bf..4e3e5c728 100644 --- a/src/Commands/PnP.PowerShell.csproj +++ b/src/Commands/PnP.PowerShell.csproj @@ -3,7 +3,7 @@ - 10 + 12 @@ -27,7 +27,7 @@ https://github.com/pnp/powershell https://github.com/pnp/powershell Microsoft 365; PowerShell; SharePoint; Teams; Graph; Azure AD - PnP PowerShell is a .NET 6 based PowerShell Module providing over 650 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. + PnP PowerShell is a .NET 8 based PowerShell Module providing over 750 cmdlets that work with Microsoft 365 environments such as SharePoint Online, Microsoft Teams, Microsoft Project, Security & Compliance, Azure Active Directory, and more. nugeticon.png README.md @@ -98,53 +98,53 @@ - - $(PnPCoreSdkPath)PnP.Core\bin\Debug\net6.0\PnP.Core.dll + + $(PnPCoreSdkPath)PnP.Core\bin\Debug\net8.0\PnP.Core.dll true false - - $(PnPCoreSdkPath)PnP.Core.Auth\bin\Debug\net6.0\PnP.Core.Auth.dll + + $(PnPCoreSdkPath)PnP.Core.Auth\bin\Debug\net8.0\PnP.Core.Auth.dll true false - - $(PnPCoreSdkPath)PnP.Core.Admin\bin\Debug\net6.0\PnP.Core.Admin.dll + + $(PnPCoreSdkPath)PnP.Core.Admin\bin\Debug\net8.0\PnP.Core.Admin.dll true false - - $(PnPCoreSdkPath)PnP.Core.Transformation\bin\Debug\net6.0\PnP.Core.Transformation.dll + + $(PnPCoreSdkPath)PnP.Core.Transformation\bin\Debug\net8.0\PnP.Core.Transformation.dll true false - - $(PnPCoreSdkPath)PnP.Core.Transformation.SharePoint\bin\Debug\net6.0\PnP.Core.Transformation.SharePoint.dll + + $(PnPCoreSdkPath)PnP.Core.Transformation.SharePoint\bin\Debug\net8.0\PnP.Core.Transformation.SharePoint.dll true false - - $(PnPFrameworkPath)PnP.Framework\bin\Debug\net6.0\PnP.Framework.dll + + $(PnPFrameworkPath)PnP.Framework\bin\Debug\net8.0\PnP.Framework.dll true false - - - - - - - + + + + + + + - - - - + + + + diff --git a/src/Commands/Sdk.targets b/src/Commands/Sdk.targets index 2ae1f125f..8cd2059c5 100644 --- a/src/Commands/Sdk.targets +++ b/src/Commands/Sdk.targets @@ -1,5 +1,5 @@ - net6.0-windows + net8.0-windows diff --git a/src/Commands/Web/InvokeWebAction.cs b/src/Commands/Web/InvokeWebAction.cs index ec9ade66b..c807de32c 100644 --- a/src/Commands/Web/InvokeWebAction.cs +++ b/src/Commands/Web/InvokeWebAction.cs @@ -1,5 +1,5 @@ using Microsoft.SharePoint.Client; -using web = Microsoft.SharePoint.Client.Web; +using Csomweb = Microsoft.SharePoint.Client.Web; using PnP.PowerShell.Commands.InvokeAction; using System; @@ -13,19 +13,19 @@ namespace PnP.PowerShell.Commands public class InvokeWebAction : PnPWebCmdlet { [Parameter(Mandatory = false)] - public web[] Webs; + public Csomweb[] Webs; [Parameter(Mandatory = false)] - public Action WebAction; + public Action WebAction; [Parameter(Mandatory = false)] - public Func ShouldProcessWebAction; + public Func ShouldProcessWebAction; [Parameter(Mandatory = false)] - public Action PostWebAction; + public Action PostWebAction; [Parameter(Mandatory = false)] - public Func ShouldProcessPostWebAction; + public Func ShouldProcessPostWebAction; [Parameter(Mandatory = false)] public string[] WebProperties; @@ -74,7 +74,7 @@ protected override void ExecuteCmdlet() return; } - InvokeActionParameter webActions = new InvokeActionParameter() + InvokeActionParameter webActions = new InvokeActionParameter() { Action = WebAction, ShouldProcessAction = ShouldProcessWebAction, @@ -102,7 +102,7 @@ protected override void ExecuteCmdlet() InvokeAction.InvokeWebAction invokeAction; if (string.IsNullOrEmpty(ListName)) { - IEnumerable websToProcess; + IEnumerable websToProcess; if (Webs == null || Webs.Length == 0) websToProcess = new[] { CurrentWeb }; else diff --git a/src/Commands/Web/RemoveWeb.cs b/src/Commands/Web/RemoveWeb.cs index 51847f161..0bf492588 100644 --- a/src/Commands/Web/RemoveWeb.cs +++ b/src/Commands/Web/RemoveWeb.cs @@ -1,10 +1,6 @@ using System.Management.Automation; using Microsoft.SharePoint.Client; -using web = Microsoft.SharePoint.Client.Web; - using PnP.PowerShell.Commands.Base.PipeBinds; -using System; -using PnP.PowerShell.Commands.Extensions; namespace PnP.PowerShell.Commands { diff --git a/src/Commands/WindowsSdk.targets b/src/Commands/WindowsSdk.targets index 5546e7ecf..05ba9fea4 100644 --- a/src/Commands/WindowsSdk.targets +++ b/src/Commands/WindowsSdk.targets @@ -1,6 +1,6 @@ - net6.0-windows + net8.0-windows true diff --git a/src/Commands/_debug/debug.ps1 b/src/Commands/_debug/debug.ps1 index 3e1037c2d..ee1a38cb0 100644 --- a/src/Commands/_debug/debug.ps1 +++ b/src/Commands/_debug/debug.ps1 @@ -4,7 +4,7 @@ $ProjectPath = $PSScriptRoot | Split-Path -Parent $BinPath = "$ProjectPath\bin\Debug" $dlls = @("PnP.PowerShell.ALC.dll", "PnP.PowerShell.dll") -$netversion = "net6.0-windows" +$netversion = "net8.0-windows" $BinPath = "$BinPath\$netversion" diff --git a/version.txt b/version.txt index bdc05df20..56fea8a08 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.12.23 \ No newline at end of file +3.0.0 \ No newline at end of file