You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (([version]$version).Major -eq6-and ([version]$version) -ge [version]$script:OSDotNetHostingBundleReq['6']['Version']) {
200
+
$installDotNetHostingBundle6=$false
201
+
}
202
+
}
203
+
184
204
if ($installDotNetCoreHostingBundle2) {
185
205
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message "Minimum .NET Core Windows Server Hosting version 2.1 for OutSystems $MajorVersion not found. We will try to download and install the latest .NET Core Windows Server Hosting bundle"
186
206
}
187
207
if ($installDotNetCoreHostingBundle3) {
188
208
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message "Minimum .NET Core Windows Server Hosting version 3.1 for OutSystems $MajorVersion not found. We will try to download and install the latest .NET Core Windows Server Hosting bundle"
189
209
}
210
+
if ($installDotNetHostingBundle6) {
211
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message "Minimum .NET Windows Server Hosting version 6.0.6 for OutSystems $MajorVersion not found. We will try to download and install the latest .NET Windows Server Hosting bundle"
212
+
}
190
213
}
191
214
}
192
215
@@ -423,6 +446,64 @@ function Install-OSServerPreReqs
423
446
}
424
447
}
425
448
449
+
# Install .NET Windows Server Hosting bundle version 6
450
+
if ($installDotNetHostingBundle6)
451
+
{
452
+
try
453
+
{
454
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message "Installing .NET 6.0 Windows Server Hosting bundle"
WriteNonTerminalError -Message ".NET 6.0 installer not found"
461
+
462
+
$installResult.Success=$false
463
+
$installResult.ExitCode=-1
464
+
$installResult.Message='.NET 6.0 installer not found'
465
+
466
+
return$installResult
467
+
}
468
+
catch
469
+
{
470
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Exception $_.Exception-Stream 3-Message "Error downloading or starting the .NET 6.0 installation"
471
+
WriteNonTerminalError -Message "Error downloading or starting the .NET 6.0 installation"
472
+
473
+
$installResult.Success=$false
474
+
$installResult.ExitCode=-1
475
+
$installResult.Message='Error downloading or starting the .NET 6.0 installation'
476
+
477
+
return$installResult
478
+
}
479
+
480
+
switch ($exitCode)
481
+
{
482
+
0
483
+
{
484
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message ".NET 6.0 Windows Server Hosting bundle successfully installed."
485
+
}
486
+
487
+
{ $_-in3010,3011 }
488
+
{
489
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 0-Message ".NET 6.0 Windows Server Hosting bundle successfully installed but a reboot is needed. Exit code: $exitCode"
490
+
$installResult.RebootNeeded=$true
491
+
}
492
+
493
+
default
494
+
{
495
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 3-Message "Error installing .NET 6.0 Windows Server Hosting bundle. Exit code: $exitCode"
496
+
WriteNonTerminalError -Message "Error installing .NET 6.0 Windows Server Hosting bundle. Exit code: $exitCode"
497
+
498
+
$installResult.Success=$false
499
+
$installResult.ExitCode=$exitCode
500
+
$installResult.Message='Error installing .NET 6.0 Windows Server Hosting bundle'
Copy file name to clipboardExpand all lines: src/Outsystems.SetupTools/Lib/PlatformSetup.ps1
+60Lines changed: 60 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,32 @@ function GetDotNetCoreHostingBundleVersions()
133
133
return$version
134
134
}
135
135
136
+
functionGetDotNetHostingBundleVersions()
137
+
{
138
+
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1-Stream 2-Message "Getting the contents of the registry key HKLM:SOFTWARE\WOW6432Node\Microsoft\Updates\.NET\Microsoft .Net<*>Windows Server Hosting<*>\PackageVersion"
0 commit comments