diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index 228cb2b3e..20da32b1d 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -18,7 +18,7 @@ param( $script:IsCIBuild = $env:APPVEYOR -ne $null $script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "Core" -and !$IsWindows -$script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) { "net451;" })netstandard1.6\`"" +$script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) { "net452;" })netstandard1.6\`"" $script:SaveModuleSupportsAllowPrerelease = (Get-Command Save-Module).Parameters.ContainsKey("AllowPrerelease") $script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Host", "BuildInfo", "BuildInfo.cs") @@ -136,7 +136,7 @@ task GetProductVersion -Before PackageNuGet, PackageModule, UploadArtifacts { function BuildForPowerShellVersion($version) { Write-Host -ForegroundColor Green "`n### Testing API usage for PowerShell $version...`n" - exec { & $script:dotnetExe build -f net451 .\src\PowerShellEditorServices\PowerShellEditorServices.csproj /p:PowerShellVersion=$version } + exec { & $script:dotnetExe build -f net452 .\src\PowerShellEditorServices\PowerShellEditorServices.csproj /p:PowerShellVersion=$version } } task TestPowerShellApi -If { !$script:IsUnix } { @@ -196,7 +196,7 @@ namespace Microsoft.PowerShell.EditorServices.Host task Build { exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f netstandard1.6 } if (!$script:IsUnix) { - exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f net451 } + exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f net452 } } exec { & $script:dotnetExe build -c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj $script:TargetFrameworksParam } exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f netstandard1.6 } @@ -267,12 +267,12 @@ task LayoutModule -After Build { Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\netstandard1.6\publish\runtimes\win\lib\netstandard1.3\* -Filter System.IO.Pipes*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Core\ if (!$script:IsUnix) { - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\Serilog*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\System.Runtime.InteropServices.RuntimeInformation.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\Serilog*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\System.Runtime.InteropServices.RuntimeInformation.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\* -Filter Microsoft.PowerShell.EditorServices*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\Newtonsoft.Json.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\UnixConsoleEcho.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\* -Filter Microsoft.PowerShell.EditorServices*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\Newtonsoft.Json.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\UnixConsoleEcho.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ } # Copy Third Party Notices.txt to module folder @@ -285,7 +285,7 @@ task LayoutModule -After Build { Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\netstandard1.6\* -Filter Microsoft.PowerShell.EditorServices.VSCode*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Core\ if (!$script:IsUnix) { - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net451\* -Filter Microsoft.PowerShell.EditorServices.VSCode*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net452\* -Filter Microsoft.PowerShell.EditorServices.VSCode*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\ } if ($Configuration -eq "Debug") { @@ -295,10 +295,10 @@ task LayoutModule -After Build { Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\netstandard1.6\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Core\ if (!$script:IsUnix) { - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.VSCode.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.Host.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ - Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.VSCode.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.Host.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ + Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\ } } } diff --git a/README.md b/README.md index f7bff82bc..5b779fc21 100644 --- a/README.md +++ b/README.md @@ -67,11 +67,11 @@ If you are using macOS you will need to download the latest version of OpenSSL. ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/ ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/ ``` -### 2. On Windows, install the .NET 4.5.1 Targeting Pack +### 2. On Windows, install the .NET 4.5.2 Targeting Pack **NOTE: This is only necessary if you don't have Visual Studio installed** -If you try to build the code and receive an error about a missing .NET 4.5.1 +If you try to build the code and receive an error about a missing .NET 4.5.2 Targeting Pack, you should download and install the [.NET Framework 4.5.2 Developer Pack](https://www.microsoft.com/en-us/download/details.aspx?id=42637). ### 3. Clone the GitHub repository: diff --git a/module/PowerShellEditorServices/Start-EditorServices.ps1 b/module/PowerShellEditorServices/Start-EditorServices.ps1 index 08f9e1bc4..32135d7af 100644 --- a/module/PowerShellEditorServices/Start-EditorServices.ps1 +++ b/module/PowerShellEditorServices/Start-EditorServices.ps1 @@ -161,18 +161,18 @@ if ($host.Runspace.LanguageMode -eq 'ConstrainedLanguage') { ExitWithError "PowerShell is configured with an unsupported LanguageMode (ConstrainedLanguage), language features are disabled." } -# net45 is not supported, only net451 and up +# net451 and lower are not supported, only net452 and up if ($PSVersionTable.PSVersion.Major -le 5) { - $net451Version = 378675 + $net452Version = 379893 $dotnetVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\").Release - if ($dotnetVersion -lt $net451Version) { + if ($dotnetVersion -lt $net452Version) { Write-SessionFile @{ status = failed reason = "netversion" detail = "$netVersion" } - ExitWithError "Your .NET version is too low. Upgrade to net451 or higher to run the PowerShell extension." + ExitWithError "Your .NET version is too low. Upgrade to net452 or higher to run the PowerShell extension." } } diff --git a/src/PowerShellEditorServices.Channel.WebSocket/PowerShellEditorServices.Channel.WebSocket.csproj b/src/PowerShellEditorServices.Channel.WebSocket/PowerShellEditorServices.Channel.WebSocket.csproj index 7d304002f..612263d23 100644 --- a/src/PowerShellEditorServices.Channel.WebSocket/PowerShellEditorServices.Channel.WebSocket.csproj +++ b/src/PowerShellEditorServices.Channel.WebSocket/PowerShellEditorServices.Channel.WebSocket.csproj @@ -3,11 +3,11 @@ PowerShell Editor Services WebSocket Protocol Channel - net451 + net452 Microsoft.PowerShell.EditorServices.Channel.WebSocket - + @@ -18,7 +18,7 @@ - + @@ -29,7 +29,7 @@ $(DefineConstants);CoreCLR - + diff --git a/src/PowerShellEditorServices.Host/App.config b/src/PowerShellEditorServices.Host/App.config index d1428ad71..066f94c5f 100644 --- a/src/PowerShellEditorServices.Host/App.config +++ b/src/PowerShellEditorServices.Host/App.config @@ -1,6 +1,6 @@ - - + + diff --git a/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj b/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj index 1874e2c20..b2d3e934f 100644 --- a/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj +++ b/src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj @@ -4,7 +4,7 @@ PowerShell Editor Services Host Process Provides a process for hosting the PowerShell Editor Services library exposed by a JSON message protocol. - netstandard1.6;net451 + netstandard1.6;net452 Microsoft.PowerShell.EditorServices.Host @@ -26,7 +26,7 @@ $(DefineConstants);CoreCLR - + diff --git a/src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj b/src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj index f8cd4cf73..459672956 100644 --- a/src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj +++ b/src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj @@ -3,7 +3,7 @@ PowerShell Editor Services Host Protocol Library Provides message types and client/server APIs for the PowerShell Editor Services JSON protocol. - netstandard1.6;net451; + netstandard1.6;net452; Microsoft.PowerShell.EditorServices.Protocol @@ -20,7 +20,7 @@ $(DefineConstants);CoreCLR - + diff --git a/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj b/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj index 930922fb1..e3726be1f 100644 --- a/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj +++ b/src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj @@ -4,7 +4,7 @@ PowerShell Editor Services, Visual Studio Code Extensions Provides added functionality to PowerShell Editor Services for the Visual Studio Code editor. - netstandard1.6;net451 + netstandard1.6;net452 Microsoft.PowerShell.EditorServices.VSCode @@ -24,7 +24,7 @@ $(DefineConstants);CoreCLR - + diff --git a/src/PowerShellEditorServices/PowerShellEditorServices.csproj b/src/PowerShellEditorServices/PowerShellEditorServices.csproj index d5060ae8f..5581912fc 100644 --- a/src/PowerShellEditorServices/PowerShellEditorServices.csproj +++ b/src/PowerShellEditorServices/PowerShellEditorServices.csproj @@ -3,7 +3,7 @@ PowerShell Editor Services Provides common PowerShell editor capabilities as a .NET library. - netstandard1.6;net451 + netstandard1.6;net452 Microsoft.PowerShell.EditorServices $(PackageTargetFallback);dnxcore50;portable-net45+win8 @@ -28,18 +28,18 @@ - + - + - + - + @@ -49,7 +49,7 @@ - + diff --git a/tools/releaseBuild/Image/DockerFile b/tools/releaseBuild/Image/DockerFile index 0fe368711..6f908ee1f 100644 --- a/tools/releaseBuild/Image/DockerFile +++ b/tools/releaseBuild/Image/DockerFile @@ -17,9 +17,8 @@ RUN Import-Module PackageManagement; ` Install-Module InvokeBuild -MaximumVersion 5.1.0 -Scope CurrentUser -Force; ` Install-Module platyPS -RequiredVersion 0.9.0 -Scope CurrentUser -Force; -# Install .NET Framework 4.5.1 & 4.5.2 Developer Packs +# Install .NET Framework 4.5.2 Developer Packs RUN Import-Module ./containerFiles/dockerInstall.psm1; ` - Install-ChocolateyPackage -PackageName netfx-4.5.1-devpack; ` Install-ChocolateyPackage -PackageName netfx-4.5.2-devpack; # Copy build script over