Skip to content

Commit

Permalink
Update .csproj files to depend on 'netcoreapp 2.1.12' and 'Microsoft.…
Browse files Browse the repository at this point in the history
…PowerShell.SDK 6.2.2' (#980)
  • Loading branch information
daxian-dbw authored Jul 30, 2019
1 parent fd9af03 commit b7b8f7b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
6 changes: 5 additions & 1 deletion MockPSConsole/MockPSConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
<ApplicationManifest>Program.manifest</ApplicationManifest>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<RuntimeFrameworkVersion>2.1.12</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Xml.XDocument" version="4.3.0" />
<PackageReference Include="System.Data.DataSetExtensions" version="4.5.0" />
<PackageReference Include="Microsoft.CSharp" version="4.5.0" />
<PackageReference Include="PowerShellStandard.Library" version="5.1.0-*" Condition="'$(TargetFramework)' == 'net461'" />
<PackageReference Include="Microsoft.PowerShell.SDK" version="6.2.0" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<PackageReference Include="Microsoft.PowerShell.SDK" version="6.2.2" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions PSReadLine/PSReadLine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
<InformationalVersion>2.0.0-beta4</InformationalVersion>
<TargetFrameworks>net461;netcoreapp2.1</TargetFrameworks>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<RuntimeFrameworkVersion>2.1.12</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" version="5.1.0-*" />
<PackageReference Include="Microsoft.CSharp" version="4.5.0-*" />
Expand Down
8 changes: 6 additions & 2 deletions test/PSReadLine.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
<TestProjectType>UnitTest</TestProjectType>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<RuntimeFrameworkVersion>2.1.12</RuntimeFrameworkVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Xml.XDocument" version="4.3.0" />
<PackageReference Include="System.Data.DataSetExtensions" version="4.5.0" />
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" version="4.3.0" />
<PackageReference Include="Microsoft.CSharp" version="4.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.0" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.2" />
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.2.2" Condition="'$(TargetFramework)' == 'netcoreapp2.1'" />
<PackageReference Include="PowerShellStandard.Library" version="5.1.0-*" Condition="'$(TargetFramework)' == 'net461'" />
</ItemGroup>

Expand Down
8 changes: 4 additions & 4 deletions tools/helper.psm1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

$MinimalSDKVersion = '2.1.300'
$MinimalSDKVersion = '2.1.801'
$IsWindowsEnv = [System.Environment]::OSVersion.Platform -eq "Win32NT"
$RepoRoot = (Resolve-Path "$PSScriptRoot/..").Path
$LocalDotnetDirPath = if ($IsWindowsEnv) { "$env:LocalAppData\Microsoft\dotnet" } else { "$env:HOME/.dotnet" }
Expand Down Expand Up @@ -68,7 +68,7 @@ function Install-Dotnet
[CmdletBinding()]
param(
[string]$Channel = 'release',
[string]$Version = '2.1.505'
[string]$Version = '2.1.801'
)

try {
Expand All @@ -77,9 +77,9 @@ function Install-Dotnet
} catch { }

$logMsg = if (Get-Command 'dotnet' -ErrorAction Ignore) {
"dotent SDK is not present. Installing dotnet SDK."
} else {
"dotnet SDK out of date. Require '$MinimalSDKVersion' but found '$dotnetSDKVersion'. Updating dotnet."
} else {
"dotent SDK is not present. Installing dotnet SDK."
}
Write-Log $logMsg -Warning

Expand Down

0 comments on commit b7b8f7b

Please sign in to comment.