Skip to content

Commit b15709f

Browse files
TravisEz13iSazonov
authored andcommitted
update to latest package references, runtime framework, and SDK (#7272)
* update to latest package references * update runtime framework * update sdk * automatically read NuGet package dependency info from csproj, where version info is fully qualified * update file.wxs
1 parent 75ba74c commit b15709f

File tree

10 files changed

+84
-46
lines changed

10 files changed

+84
-46
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ after_success:
6161
# which is expensive and unneeded for build agents.
6262
env:
6363
global:
64-
- CACHE_VERSION=netcoreapp.2.1-sdk.2.1.301
64+
- CACHE_VERSION=netcoreapp.2.1-sdk.2.1.302
6565
- POWERSHELL_TELEMETRY_OPTOUT=1
6666
- DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
6767

PowerShell.Common.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
9595

9696
<TargetFramework>netcoreapp2.1</TargetFramework>
97-
<RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion>
97+
<RuntimeFrameworkVersion>2.1.2</RuntimeFrameworkVersion>
9898
<LangVersion>Latest</LangVersion>
9999

100100
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
@@ -118,7 +118,7 @@
118118
<PropertyGroup Condition=" '$(IsWindows)' != 'true' ">
119119
<DefineConstants>$(DefineConstants);UNIX</DefineConstants>
120120
</PropertyGroup>
121-
121+
122122
<!-- Define all OS, debug configuration properties -->
123123
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
124124
<DebugType>portable</DebugType>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
1010
Purpose: ElevatedPesterTests_xUnit_Packaging
1111

12-
# cache version - netcoreapp.2.1-sdk.2.1.301
12+
# cache version - netcoreapp.2.1-sdk.2.1.302
1313
cache:
1414
- '%HOMEDRIVE%%HOMEPATH%\.nuget\packages -> appveyor.yml'
1515

assets/files.wxs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@
190190
<Component Id="cmp2B60F4AC2E8D95A558C3E121A6252D37" Guid="{C361734D-C0E0-47E2-B867-82878D0F0E4C}">
191191
<File Id="fil8E8E3BF1C97D92DFEB4FC97D778F238F" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Runtime.CompilerServices.VisualC.dll" />
192192
</Component>
193-
<Component Id="cmp94BBA02944344967A5B4ABEDB5E5AD21" Guid="{0E836BC9-94C6-42F2-B213-2990D06172BE}">
194-
<File Id="filDDE80F6ACEC54B56BA33E587A072DE27" KeyPath="yes" Source="$(env.ProductSourcePath)\sos_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26606.02.dll" />
193+
<Component Id="cmp9C01EB4ABD5E45E99A578811CBA32639" Guid="{09C9310D-56AD-4F7A-90C8-DF0F7E8A7251}">
194+
<File Id="filDDE80F6ACEC54B56BA33E587A072DE27" KeyPath="yes" Source="$(env.ProductSourcePath)\sos_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26628.05.dll" />
195195
</Component>
196196
<Component Id="cmp5977DC14DE00AD6E597A2FEBB8C3B58B" Guid="{8E01E3C2-0596-46D8-95DD-BCA308A88941}">
197197
<File Id="filEE7925E7A712381B024DAE39831F7AEB" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Threading.dll" />
@@ -487,8 +487,8 @@
487487
<Component Id="cmp644DFED4A59040568D091F0EA5F691E6" Guid="{C63BB7F7-682A-4EF4-AEFE-5A7BE5475AAA}">
488488
<File Id="fil69EA4231E04E7B76EE0676A3C7EB4F91" KeyPath="yes" Source="$(env.ProductSourcePath)\System.Security.Cryptography.Pkcs.dll" />
489489
</Component>
490-
<Component Id="cmpFACAD92324CA40CAB89EFD08A5EE1BCB" Guid="{C2E1292A-F64D-44B3-9E82-91ADF240228E}">
491-
<File Id="fil87A274531F374FB186928D7A3B28F54F" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26606.02.dll" />
490+
<Component Id="cmp2C8A6F940411401A9A6EFF6CD7F4A8C8" Guid="{8B8505AA-27B2-4244-A1C3-1E5952D64B64}">
491+
<File Id="fil87A274531F374FB186928D7A3B28F54F" KeyPath="yes" Source="$(env.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_4.6.26628.05.dll" />
492492
</Component>
493493
<Component Id="cmpCC989C2FC3319628C5A0897A9CDB4C7D" Guid="{2FC1414C-925B-4653-B376-0DC7114DAA4C}">
494494
<File Id="fil2FBB26045517B5A73BF6024C55539694" KeyPath="yes" Source="$(env.ProductSourcePath)\api-ms-win-core-processthreads-l1-1-0.dll" />
@@ -1981,7 +1981,7 @@
19811981
<ComponentRef Id="cmp23FD946C6681D6747F1B638ECBE8C8BC" />
19821982
<ComponentRef Id="cmp4B935A8190C2D7D1F0E0DB9E5AAD7F30" />
19831983
<ComponentRef Id="cmp2B60F4AC2E8D95A558C3E121A6252D37" />
1984-
<ComponentRef Id="cmp94BBA02944344967A5B4ABEDB5E5AD21" />
1984+
<ComponentRef Id="cmp9C01EB4ABD5E45E99A578811CBA32639" />
19851985
<ComponentRef Id="cmp5977DC14DE00AD6E597A2FEBB8C3B58B" />
19861986
<ComponentRef Id="cmp689C7CE34E0246D8B56D370E898354CE" />
19871987
<ComponentRef Id="cmp634E012FEF6122735D91DE4B1BCC1116" />
@@ -2080,7 +2080,7 @@
20802080
<ComponentRef Id="cmpE66ABF016916C709133CA0DB9366469F" />
20812081
<ComponentRef Id="cmpECCD26D8C540FA35F5C633B318EB742E" />
20822082
<ComponentRef Id="cmp644DFED4A59040568D091F0EA5F691E6" />
2083-
<ComponentRef Id="cmpFACAD92324CA40CAB89EFD08A5EE1BCB" />
2083+
<ComponentRef Id="cmp2C8A6F940411401A9A6EFF6CD7F4A8C8" />
20842084
<ComponentRef Id="cmpCC989C2FC3319628C5A0897A9CDB4C7D" />
20852085
<ComponentRef Id="cmpC9085D713FC071587C61ACFE51384BDD" />
20862086
<ComponentRef Id="cmpB942FEF3BC11F835DF30CDDD845486AD" />

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "2.1.301"
3+
"version": "2.1.302"
44
}
55
}

src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
<ItemGroup>
6868
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.8.2" />
6969
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.8.2" />
70-
<PackageReference Include="NJsonSchema" Version="9.10.56" />
70+
<PackageReference Include="NJsonSchema" Version="9.10.63" />
7171
</ItemGroup>
7272

7373
</Project>

src/Microsoft.PowerShell.SDK/Microsoft.PowerShell.SDK.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@
2323
<PackageReference Include="System.Text.Encodings.Web" Version="4.5.0" />
2424
<PackageReference Include="System.Threading.AccessControl" Version="4.5.0" />
2525
<!-- the following package(s) are from https://github.com/dotnet/wfc -->
26-
<PackageReference Include="System.ServiceModel.Duplex" Version="4.5.1" />
27-
<PackageReference Include="System.ServiceModel.Http" Version="4.5.1" />
28-
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.5.1" />
29-
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.1" />
30-
<PackageReference Include="System.ServiceModel.Security" Version="4.5.1" />
31-
<PackageReference Include="System.Private.ServiceModel" Version="4.5.1" />
26+
<PackageReference Include="System.ServiceModel.Duplex" Version="4.5.2" />
27+
<PackageReference Include="System.ServiceModel.Http" Version="4.5.2" />
28+
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.5.2" />
29+
<PackageReference Include="System.ServiceModel.Primitives" Version="4.5.2" />
30+
<PackageReference Include="System.ServiceModel.Security" Version="4.5.2" />
31+
<PackageReference Include="System.Private.ServiceModel" Version="4.5.2" />
3232
<!-- the source could not be found for the following package(s) -->
3333
<PackageReference Include="Microsoft.NETCore.Windows.ApiSets" Version="1.0.1" />
3434
<PackageReference Include="Microsoft.Windows.Compatibility" Version="2.0.0" />

test/Test.Common.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<Copyright>(c) Microsoft Corporation. All rights reserved.</Copyright>
66

77
<TargetFramework>netcoreapp2.1</TargetFramework>
8-
<RuntimeFrameworkVersion>2.1.1</RuntimeFrameworkVersion>
8+
<RuntimeFrameworkVersion>2.1.2</RuntimeFrameworkVersion>
99

1010
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1111
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

test/tools/WebListener/WebListener.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
10+
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.2" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

tools/packaging/packaging.psm1

Lines changed: 64 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,21 +1496,33 @@ function New-UnifiedNugetPackage
14961496

14971497
'Microsoft.PowerShell.Commands.Management' {
14981498
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.PowerShell.Security'), [tuple]::Create('version', $PackageVersion))) > $null
1499-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceProcess.ServiceController'), [tuple]::Create('version', '4.5.0'))) > $null
1499+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1500+
{
1501+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1502+
}
15001503
}
15011504

15021505
'Microsoft.PowerShell.Commands.Utility' {
15031506
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Management.Automation'), [tuple]::Create('version', $PackageVersion))) > $null
1504-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.CodeAnalysis.CSharp'), [tuple]::Create('version', '2.7.0'))) > $null
1507+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1508+
{
1509+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1510+
}
15051511
}
15061512

15071513
'Microsoft.PowerShell.ConsoleHost' {
15081514
$deps.Add([tuple]::Create( [tuple]::Create('id', 'System.Management.Automation'), [tuple]::Create('version', $PackageVersion))) > $null
1509-
$deps.Add([tuple]::Create( [tuple]::Create('id', 'Microsoft.ApplicationInsights'), [tuple]::Create('version', '2.4.0'))) > $null
1515+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1516+
{
1517+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1518+
}
15101519
}
15111520

15121521
'Microsoft.PowerShell.CoreCLR.Eventing' {
1513-
$deps.Add([tuple]::Create( [tuple]::Create('id', 'System.Security.Principal.Windows'), [tuple]::Create('version', '4.5.0'))) > $null
1522+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1523+
{
1524+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1525+
}
15141526
}
15151527

15161528
'Microsoft.PowerShell.SDK' {
@@ -1519,20 +1531,10 @@ function New-UnifiedNugetPackage
15191531
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.PowerShell.ConsoleHost'), [tuple]::Create('version', $PackageVersion))) > $null
15201532
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.PowerShell.Security'), [tuple]::Create('version', $PackageVersion))) > $null
15211533
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Management.Automation'), [tuple]::Create('version', $PackageVersion))) > $null
1522-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Data.SqlClient'), [tuple]::Create('version', '4.5.0'))) > $null
1523-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.IO.Packaging'), [tuple]::Create('version', '4.5.0'))) > $null
1524-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Net.Http.WinHttpHandler'), [tuple]::Create('version', '4.5.0'))) > $null
1525-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceModel.Duplex'), [tuple]::Create('version', '4.5.0'))) > $null
1526-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceModel.Http'), [tuple]::Create('version', '4.5.0'))) > $null
1527-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceModel.NetTcp'), [tuple]::Create('version', '4.5.0'))) > $null
1528-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceModel.Primitives'), [tuple]::Create('version', '4.5.0'))) > $null
1529-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceModel.Security'), [tuple]::Create('version', '4.5.0'))) > $null
1530-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Text.Encodings.Web'), [tuple]::Create('version', '4.5.0'))) > $null
1531-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Threading.AccessControl'), [tuple]::Create('version', '4.5.0'))) > $null
1532-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Private.ServiceModel'), [tuple]::Create('version', '4.5.0'))) > $null
1533-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.NETCore.Windows.ApiSets'), [tuple]::Create('version', '1.0.1'))) > $null
1534-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.WSMan.Management'), [tuple]::Create('version', $PackageVersion))) > $null
1535-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.PowerShell.Commands.Diagnostics'), [tuple]::Create('version', $PackageVersion))) > $null
1534+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1535+
{
1536+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1537+
}
15361538
}
15371539

15381540
'Microsoft.PowerShell.Security' {
@@ -1542,7 +1544,10 @@ function New-UnifiedNugetPackage
15421544
'Microsoft.WSMan.Management' {
15431545
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Management.Automation'), [tuple]::Create('version', $PackageVersion))) > $null
15441546
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.WSMan.Runtime'), [tuple]::Create('version', $PackageVersion))) > $null
1545-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.ServiceProcess.ServiceController'), [tuple]::Create('version', '4.5.0'))) > $null
1547+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1548+
{
1549+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1550+
}
15461551
}
15471552

15481553
'Microsoft.WSMan.Runtime' {
@@ -1551,13 +1556,11 @@ function New-UnifiedNugetPackage
15511556

15521557
'System.Management.Automation' {
15531558
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.PowerShell.CoreCLR.Eventing'), [tuple]::Create('version', $PackageVersion))) > $null
1554-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.Win32.Registry.AccessControl'), [tuple]::Create('version', '4.5.0'))) > $null
1555-
$deps.Add([tuple]::Create([tuple]::Create('id', 'Newtonsoft.Json'), [tuple]::Create('version', '10.0.3'))) > $null
1556-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.IO.FileSystem.AccessControl'), [tuple]::Create('version', '4.5.0'))) > $null
1557-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Security.AccessControl'), [tuple]::Create('version', '4.5.0'))) > $null
1558-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Security.Cryptography.Pkcs'), [tuple]::Create('version', '4.5.0'))) > $null
1559-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Security.Permissions'), [tuple]::Create('version', '4.5.0'))) > $null
1560-
$deps.Add([tuple]::Create([tuple]::Create('id', 'System.Text.Encoding.CodePages'), [tuple]::Create('version', '4.3.0'))) > $null
1559+
foreach($packageInfo in (Get-ProjectPackageInformation -ProjectName $fileBaseName))
1560+
{
1561+
$deps.Add([tuple]::Create([tuple]::Create('id', $packageInfo.Name), [tuple]::Create('version', $packageInfo.Version))) > $null
1562+
}
1563+
15611564
$deps.Add([tuple]::Create([tuple]::Create('id', 'Microsoft.Management.Infrastructure'), [tuple]::Create('version', '1.0.0-alpha08'))) > $null
15621565
$deps.Add([tuple]::Create([tuple]::Create('id', 'PowerShell.Core.Instrumentation'), [tuple]::Create('version', '6.0.0-RC2'))) > $null
15631566
$deps.Add([tuple]::Create([tuple]::Create('id', 'libpsl'), [tuple]::Create('version', '6.0.0-rc'))) > $null
@@ -1580,6 +1583,41 @@ function New-UnifiedNugetPackage
15801583
}
15811584
}
15821585

1586+
<#
1587+
.SYNOPSIS
1588+
Return the list of packages and versions used by a project
1589+
1590+
.PARAMETER ProjectName
1591+
The name of the project to get the projects for.
1592+
#>
1593+
function Get-ProjectPackageInformation
1594+
{
1595+
param(
1596+
[Parameter(Mandatory = $true)]
1597+
[string]
1598+
$ProjectName
1599+
)
1600+
1601+
$csproj = "$PSScriptRoot\..\..\src\$ProjectName\$ProjectName.csproj"
1602+
[xml] $csprojXml = (Get-content -Raw -Path $csproj)
1603+
1604+
# get the package references
1605+
$packages=$csprojXml.Project.ItemGroup.PackageReference
1606+
1607+
# check to see if there is a newer package for each refernce
1608+
foreach($package in $packages)
1609+
{
1610+
if($package.Version -notmatch '\*' -and $package.Include)
1611+
{
1612+
# Get the name of the package
1613+
[PSCustomObject] @{
1614+
Name = $package.Include
1615+
Version = $package.Version
1616+
}
1617+
}
1618+
}
1619+
}
1620+
15831621
<#
15841622
.SYNOPSIS
15851623
Creates a nuspec file.

0 commit comments

Comments
 (0)