Skip to content

Commit bcbc5e7

Browse files
committed
upgrade to net452 since net451 is not supported any more
1 parent 3e0ee90 commit bcbc5e7

File tree

7 files changed

+33
-33
lines changed

7 files changed

+33
-33
lines changed

PowerShellEditorServices.build.ps1

+13-13
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ param(
1818

1919
$script:IsCIBuild = $env:APPVEYOR -ne $null
2020
$script:IsUnix = $PSVersionTable.PSEdition -and $PSVersionTable.PSEdition -eq "Core" -and !$IsWindows
21-
$script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) { "net451;" })netstandard1.6\`""
21+
$script:TargetFrameworksParam = "/p:TargetFrameworks=\`"$(if (!$script:IsUnix) { "net452;" })netstandard1.6\`""
2222
$script:SaveModuleSupportsAllowPrerelease = (Get-Command Save-Module).Parameters.ContainsKey("AllowPrerelease")
2323
$script:BuildInfoPath = [System.IO.Path]::Combine($PSScriptRoot, "src", "PowerShellEditorServices.Host", "BuildInfo", "BuildInfo.cs")
2424

@@ -136,7 +136,7 @@ task GetProductVersion -Before PackageNuGet, PackageModule, UploadArtifacts {
136136

137137
function BuildForPowerShellVersion($version) {
138138
Write-Host -ForegroundColor Green "`n### Testing API usage for PowerShell $version...`n"
139-
exec { & $script:dotnetExe build -f net451 .\src\PowerShellEditorServices\PowerShellEditorServices.csproj /p:PowerShellVersion=$version }
139+
exec { & $script:dotnetExe build -f net452 .\src\PowerShellEditorServices\PowerShellEditorServices.csproj /p:PowerShellVersion=$version }
140140
}
141141

142142
task TestPowerShellApi -If { !$script:IsUnix } {
@@ -196,7 +196,7 @@ namespace Microsoft.PowerShell.EditorServices.Host
196196
task Build {
197197
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f netstandard1.6 }
198198
if (!$script:IsUnix) {
199-
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f net451 }
199+
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices.Host\PowerShellEditorServices.Host.csproj -f net452 }
200200
}
201201
exec { & $script:dotnetExe build -c $Configuration .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj $script:TargetFrameworksParam }
202202
exec { & $script:dotnetExe publish -c $Configuration .\src\PowerShellEditorServices\PowerShellEditorServices.csproj -f netstandard1.6 }
@@ -267,12 +267,12 @@ task LayoutModule -After Build {
267267
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\
268268

269269
if (!$script:IsUnix) {
270-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\Serilog*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop
271-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\System.Runtime.InteropServices.RuntimeInformation.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
270+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\Serilog*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop
271+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\System.Runtime.InteropServices.RuntimeInformation.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
272272

273-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\* -Filter Microsoft.PowerShell.EditorServices*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
274-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\Newtonsoft.Json.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
275-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\UnixConsoleEcho.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
273+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\* -Filter Microsoft.PowerShell.EditorServices*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
274+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\Newtonsoft.Json.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
275+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\UnixConsoleEcho.dll -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
276276
}
277277

278278
# Copy Third Party Notices.txt to module folder
@@ -285,7 +285,7 @@ task LayoutModule -After Build {
285285

286286
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\
287287
if (!$script:IsUnix) {
288-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net451\* -Filter Microsoft.PowerShell.EditorServices.VSCode*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\
288+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net452\* -Filter Microsoft.PowerShell.EditorServices.VSCode*.dll -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\
289289
}
290290

291291
if ($Configuration -eq "Debug") {
@@ -295,10 +295,10 @@ task LayoutModule -After Build {
295295
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\netstandard1.6\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Core\
296296

297297
if (!$script:IsUnix) {
298-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.VSCode.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\
299-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
300-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.Host.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
301-
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\net451\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
298+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.VSCode\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.VSCode.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin\Desktop\
299+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
300+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Host\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.Host.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
301+
Copy-Item -Force -Path $PSScriptRoot\src\PowerShellEditorServices.Protocol\bin\$Configuration\net452\Microsoft.PowerShell.EditorServices.Protocol.pdb -Destination $PSScriptRoot\module\PowerShellEditorServices\bin\Desktop\
302302
}
303303
}
304304
}

module/PowerShellEditorServices/Start-EditorServices.ps1

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,18 +161,18 @@ if ($host.Runspace.LanguageMode -eq 'ConstrainedLanguage') {
161161
ExitWithError "PowerShell is configured with an unsupported LanguageMode (ConstrainedLanguage), language features are disabled."
162162
}
163163

164-
# net45 is not supported, only net451 and up
164+
# net451 and lower are not supported, only net452 and up
165165
if ($PSVersionTable.PSVersion.Major -le 5) {
166-
$net451Version = 378675
166+
$net452Version = 379893
167167
$dotnetVersion = (Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full\").Release
168-
if ($dotnetVersion -lt $net451Version) {
168+
if ($dotnetVersion -lt $net452Version) {
169169
Write-SessionFile @{
170170
status = failed
171171
reason = "netversion"
172172
detail = "$netVersion"
173173
}
174174

175-
ExitWithError "Your .NET version is too low. Upgrade to net451 or higher to run the PowerShell extension."
175+
ExitWithError "Your .NET version is too low. Upgrade to net452 or higher to run the PowerShell extension."
176176
}
177177
}
178178

src/PowerShellEditorServices.Channel.WebSocket/PowerShellEditorServices.Channel.WebSocket.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
<PropertyGroup>
55
<AssemblyTitle>PowerShell Editor Services WebSocket Protocol Channel</AssemblyTitle>
6-
<TargetFramework>net451</TargetFramework>
6+
<TargetFramework>net452</TargetFramework>
77
<AssemblyName>Microsoft.PowerShell.EditorServices.Channel.WebSocket</AssemblyName>
88
</PropertyGroup>
99

10-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
10+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
1111
<ProjectReference Include="..\PowerShellEditorServices\PowerShellEditorServices.csproj" />
1212
<ProjectReference Include="..\PowerShellEditorServices.Protocol\PowerShellEditorServices.Protocol.csproj" />
1313
</ItemGroup>
@@ -18,7 +18,7 @@
1818
</PackageReference>
1919
</ItemGroup>
2020

21-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
21+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
2222
<PackageReference Include="CommonServiceLocator" Version="1.3" />
2323
<PackageReference Include="Microsoft.Owin" Version="3.0.0" />
2424
<PackageReference Include="Owin" Version="1.0" />
@@ -29,7 +29,7 @@
2929
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
3030
</PropertyGroup>
3131

32-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
32+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
3333
<Reference Include="System" />
3434
<Reference Include="Microsoft.CSharp" />
3535
</ItemGroup>

src/PowerShellEditorServices.Host/PowerShellEditorServices.Host.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<AssemblyTitle>PowerShell Editor Services Host Process</AssemblyTitle>
66
<Description>Provides a process for hosting the PowerShell Editor Services library exposed by a JSON message protocol.</Description>
7-
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
7+
<TargetFrameworks>netstandard1.6;net452</TargetFrameworks>
88
<AssemblyName>Microsoft.PowerShell.EditorServices.Host</AssemblyName>
99
</PropertyGroup>
1010

@@ -26,7 +26,7 @@
2626
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
2727
</PropertyGroup>
2828

29-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
29+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
3030
<Reference Include="System" />
3131
<Reference Include="Microsoft.CSharp" />
3232
</ItemGroup>

src/PowerShellEditorServices.Protocol/PowerShellEditorServices.Protocol.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<AssemblyTitle>PowerShell Editor Services Host Protocol Library</AssemblyTitle>
55
<Description>Provides message types and client/server APIs for the PowerShell Editor Services JSON protocol.</Description>
6-
<TargetFrameworks>netstandard1.6;net451;</TargetFrameworks>
6+
<TargetFrameworks>netstandard1.6;net452;</TargetFrameworks>
77
<AssemblyName>Microsoft.PowerShell.EditorServices.Protocol</AssemblyName>
88
</PropertyGroup>
99
<ItemGroup>
@@ -20,7 +20,7 @@
2020
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard1.6' ">
2121
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
2222
</PropertyGroup>
23-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
23+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
2424
<Reference Include="System" />
2525
<Reference Include="Microsoft.CSharp" />
2626
</ItemGroup>

src/PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<PropertyGroup>
55
<AssemblyTitle>PowerShell Editor Services, Visual Studio Code Extensions</AssemblyTitle>
66
<Description>Provides added functionality to PowerShell Editor Services for the Visual Studio Code editor.</Description>
7-
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
7+
<TargetFrameworks>netstandard1.6;net452</TargetFrameworks>
88
<AssemblyName>Microsoft.PowerShell.EditorServices.VSCode</AssemblyName>
99
</PropertyGroup>
1010

@@ -24,7 +24,7 @@
2424
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
2525
</PropertyGroup>
2626

27-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
27+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
2828
<Reference Include="System" />
2929
<Reference Include="Microsoft.CSharp" />
3030
</ItemGroup>

src/PowerShellEditorServices/PowerShellEditorServices.csproj

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<AssemblyTitle>PowerShell Editor Services</AssemblyTitle>
55
<Description>Provides common PowerShell editor capabilities as a .NET library.</Description>
6-
<TargetFrameworks>netstandard1.6;net451</TargetFrameworks>
6+
<TargetFrameworks>netstandard1.6;net452</TargetFrameworks>
77
<AssemblyName>Microsoft.PowerShell.EditorServices</AssemblyName>
88
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netstandard1.6' ">$(PackageTargetFallback);dnxcore50;portable-net45+win8</PackageTargetFallback>
99
</PropertyGroup>
@@ -28,18 +28,18 @@
2828
</PropertyGroup>
2929

3030
<Target Name="PowerShellVersionOutput" BeforeTargets="Compile">
31-
<Message Condition=" '$(TargetFramework)' == 'net451' And '$(PowerShellVersion)' != '' " Text="Target PowerShell Version: $(PowerShellVersion) -- Constants: $(DefineConstants)" Importance="High" />
31+
<Message Condition=" '$(TargetFramework)' == 'net452' And '$(PowerShellVersion)' != '' " Text="Target PowerShell Version: $(PowerShellVersion) -- Constants: $(DefineConstants)" Importance="High" />
3232
</Target>
3333

34-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' And '$(PowerShellVersion)' == 'v3' ">
34+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' And '$(PowerShellVersion)' == 'v3' ">
3535
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
3636
</ItemGroup>
3737

38-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' And '$(PowerShellVersion)' == 'v4' ">
38+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' And '$(PowerShellVersion)' == 'v4' ">
3939
<PackageReference Include="Microsoft.PowerShell.4.ReferenceAssemblies" Version="1.0.0" />
4040
</ItemGroup>
4141

42-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' And ('$(PowerShellVersion)' == 'v5r2' Or '$(PowerShellVersion)' == 'v5r1')">
42+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' And ('$(PowerShellVersion)' == 'v5r2' Or '$(PowerShellVersion)' == 'v5r1')">
4343
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.0.0" />
4444
</ItemGroup>
4545

@@ -49,7 +49,7 @@
4949
</PackageReference>
5050
</ItemGroup>
5151

52-
<ItemGroup Condition=" '$(TargetFramework)' == 'net451' ">
52+
<ItemGroup Condition=" '$(TargetFramework)' == 'net452' ">
5353
<Reference Include="System" />
5454
<Reference Include="Microsoft.CSharp" />
5555
<Reference Include="System.Core" />

0 commit comments

Comments
 (0)