Skip to content

Commit 77caf71

Browse files
Update projects and scripts to use .NET 7 preview 1 pre-release builds (PowerShell#16856)
* Update script to consume .NET 7 builds * Update target framework * Add dotnet metadata override value * Update dependencies * Update analyzer * Conditionally add output argument * Update files.wxs * Fix tests * Update Microsoft.PowerShell.Native to �7.3.0-preview.1 * Disable psget tests * Update to latest build for .NET 7 preview 1 * Disable ready to run * Update version of `Microsoft.AspNetCore.Mvc.NewtonsoftJson` package * Update cgmanifest and startup test
1 parent add08d3 commit 77caf71

36 files changed

Lines changed: 127 additions & 84 deletions

File tree

Analyzers.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project>
22
<ItemGroup>
33
<PackageReference Include="DotNetAnalyzers.DocumentationAnalyzers" Version="1.0.0-beta.59" PrivateAssets="all" />
4-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0" PrivateAssets="all" />
5-
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" PrivateAssets="all" />
4+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22068.2" PrivateAssets="all" />
5+
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" />
66
</ItemGroup>
77
</Project>

DotnetRuntimeMetadata.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"sdk": {
3-
"channel": "6.0.1xx",
4-
"quality": "ga",
3+
"channel": "7.0.1xx-preview1",
4+
"quality": "signed",
55
"qualityFallback": "daily",
6-
"packageVersionPattern": "6.0.0",
7-
"sdkImageVersion": "6.0.100",
8-
"nextChannel": "6.0.1xx",
6+
"packageVersionPattern": "7.0.0-preview.1",
7+
"sdkImageVersion": "7.0.100",
8+
"nextChannel": "7.0.1xx-preview1",
99
"azureFeed": "",
10-
"sdkImageOverride": ""
10+
"sdkImageOverride": "7.0.100-preview.1.22110.4"
1111
},
1212
"internalfeed" : {
1313
"url": ""

PowerShell.Common.props

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@
135135
<Company>Microsoft Corporation</Company>
136136
<Copyright>(c) Microsoft Corporation.</Copyright>
137137

138-
<TargetFramework>net6.0</TargetFramework>
138+
<TargetFramework>net7.0</TargetFramework>
139139
<LangVersion>10.0</LangVersion>
140+
<!-- disable ReadyToRun due to issue: https://github.com/dotnet/runtime/issues/65412
140141
<PublishReadyToRun Condition=" '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>
141-
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>
142+
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols-->
142143

143144
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
144145
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

assets/wix/files.wxs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1638,6 +1638,9 @@
16381638
<Component Id="cmpA75DEF5617C54DA1937CB37D5824BF79">
16391639
<File Id="fil3EE6096BD3C8407685E881F3CE6BF5C1" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Security.Cryptography.OpenSsl.dll" />
16401640
</Component>
1641+
<Component Id="cmpE5993DB9118640FD8C180A2D61C89C01">
1642+
<File Id="fil7381E5F4FBC64B60A8B7D7841B89F4C6" KeyPath="yes" Source="$(var.ProductSourcePath)\ref\System.Security.Cryptography.dll" />
1643+
</Component>
16411644
</Directory>
16421645
<Directory Id="dirC72EEAF9434D4AD066E0F4D20D8E816C" Name="en-US">
16431646
<Component Id="cmpDC2EF4541FA5A2E63F36A8CD6C5FA51B">
@@ -3154,8 +3157,11 @@
31543157
<Component Id="cmp22840874A8C84AA796496634FBEBF09C">
31553158
<File Id="fil2067B616D1FA4B30932A0240ABE06089" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Web.Services.Description.dll" />
31563159
</Component>
3157-
<Component Id="cmpC100F34A32A0436A973FE7F9A02F5A78">
3158-
<File Id="filC8B8F95747F64A97B511342C7F154B54" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_6.0.121.56705.dll" />
3160+
<Component Id="cmpAC388473B5C048E3AB478DCC0B3C61FE">
3161+
<File Id="fil2D3CF7A46E0842BABB83B0A8787FED26" KeyPath="yes" Source="$(var.ProductSourcePath)\mscordaccore_$(var.FileArchitecture)_$(var.FileArchitecture)_7.0.22.7608.dll" />
3162+
</Component>
3163+
<Component Id="cmpE0DEAA289B2D4594A0C4791B2808C97C">
3164+
<File Id="fil530EAD567BDB402FA6F02AFAA696D721" KeyPath="yes" Source="$(var.ProductSourcePath)\System.Security.Cryptography.dll" />
31593165
</Component>
31603166
</DirectoryRef>
31613167
</Fragment>
@@ -4172,8 +4178,10 @@
41724178
<ComponentRef Id="cmp0C4751F9D5C14419A45F234152D21DA9" />
41734179
<ComponentRef Id="cmpF96C036EAE3B436DB096888697193FAF" />
41744180
<ComponentRef Id="cmp789F545EA2CB4AC5A2688CF730A5F6B4" />
4175-
<ComponentRef Id="cmpC100F34A32A0436A973FE7F9A02F5A78" />
41764181
<ComponentRef Id="cmpB7C69B48760E47CD89D0641D4A9FEFE9" />
4182+
<ComponentRef Id="cmpAC388473B5C048E3AB478DCC0B3C61FE" />
4183+
<ComponentRef Id="cmpE5993DB9118640FD8C180A2D61C89C01" />
4184+
<ComponentRef Id="cmpE0DEAA289B2D4594A0C4791B2808C97C" />
41774185
</ComponentGroup>
41784186
</Fragment>
41794187
</Wix>

build.psm1

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,9 @@ Fix steps:
541541

542542
try {
543543
Push-Location $globalToolSrcFolder
544-
$Arguments += "--output", $publishPath
544+
if ($Arguments -notcontains '--output') {
545+
$Arguments += "--output", $publishPath
546+
}
545547
Write-Log -message "Run dotnet $Arguments from $PWD to build global tool entry point"
546548
Start-NativeExecution { dotnet $Arguments }
547549
}
@@ -801,8 +803,8 @@ function New-PSOptions {
801803
[ValidateSet("Debug", "Release", "CodeCoverage", '')]
802804
[string]$Configuration,
803805

804-
[ValidateSet("net6.0")]
805-
[string]$Framework = "net6.0",
806+
[ValidateSet("net7.0")]
807+
[string]$Framework = "net7.0",
806808

807809
# These are duplicated from Start-PSBuild
808810
# We do not use ValidateScript since we want tab completion
@@ -1745,11 +1747,6 @@ function Install-Dotnet {
17451747

17461748
Write-Verbose -Verbose "In install-dotnet"
17471749

1748-
# This is needed workaround for RTM pre-release build as the SDK version is always 6.0.100 after installation for every pre-release
1749-
if ($dotnetCLIRequiredVersion -like '6.0.100-rtm.*') {
1750-
$dotnetCLIRequiredVersion = '6.0.100'
1751-
}
1752-
17531750
# This allows sudo install to be optional; needed when running in containers / as root
17541751
# Note that when it is null, Invoke-Expression (but not &) must be used to interpolate properly
17551752
$sudo = if (!$NoSudo) { "sudo" }
@@ -1818,13 +1815,11 @@ function Install-Dotnet {
18181815
$installScript = "dotnet-install.ps1"
18191816
Invoke-WebRequest -Uri $installObtainUrl/$installScript -OutFile $installScript
18201817
if (-not $environment.IsCoreCLR) {
1821-
$installArgs = @{
1822-
Quality = $Quality
1823-
}
1824-
1818+
$installArgs = @{}
18251819
if ($Version) {
18261820
$installArgs += @{ Version = $Version }
18271821
} elseif ($Channel) {
1822+
$installArgs += @{ Quality = $Quality }
18281823
$installArgs += @{ Channel = $Channel }
18291824
}
18301825

@@ -1850,7 +1845,7 @@ function Install-Dotnet {
18501845
$fullDotnetInstallPath = Join-Path -Path (Convert-Path -Path $PWD.Path) -ChildPath $installScript
18511846

18521847
if ($Version) {
1853-
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Version', $Version, '-Quality', $Quality)
1848+
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Version', $Version)
18541849
}
18551850
elseif ($Channel) {
18561851
$psArgs = @('-NoLogo', '-NoProfile', '-File', $fullDotnetInstallPath, '-Channel', $Channel, '-Quality', $Quality)

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": "6.0.101"
3+
"version": "7.0.100-preview.1"
44
}
55
}

nuget.config

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
<configuration>
33
<packageSources>
44
<clear />
5+
<add key="dotnet" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/7.0.100-preview.1.22110.4-shipping/nuget/v2" />
56
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
67
</packageSources>
78
<disabledPackageSources>
89
<clear />
910
</disabledPackageSources>
1011
</configuration>
11-
12-

src/Microsoft.PowerShell.Commands.Management/Microsoft.PowerShell.Commands.Management.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
<ItemGroup>
4949
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
50-
<PackageReference Include="System.ServiceProcess.ServiceController" Version="6.0.0" />
50+
<PackageReference Include="System.ServiceProcess.ServiceController" Version="7.0.0-preview.1.22076.8" />
5151
</ItemGroup>
5252

5353
</Project>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
</ItemGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.1" />
35-
<PackageReference Include="System.Threading.AccessControl" Version="6.0.0" />
36-
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
34+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.1.0-3.final" />
35+
<PackageReference Include="System.Threading.AccessControl" Version="7.0.0-preview.1.22076.8" />
36+
<PackageReference Include="System.Drawing.Common" Version="7.0.0-preview.1.22076.8" />
3737
<PackageReference Include="NJsonSchema" Version="10.5.2" />
3838
</ItemGroup>
3939

src/Microsoft.PowerShell.CoreCLR.Eventing/Microsoft.PowerShell.CoreCLR.Eventing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<ItemGroup>
1010
<!-- the following package(s) are from https://github.com/dotnet/corefx -->
11-
<PackageReference Include="System.Diagnostics.EventLog" Version="6.0.0" />
11+
<PackageReference Include="System.Diagnostics.EventLog" Version="7.0.0-preview.1.22076.8" />
1212
</ItemGroup>
1313

1414
</Project>

0 commit comments

Comments
 (0)