diff --git a/ContainerHandling/New-NavContainer.ps1 b/ContainerHandling/New-NavContainer.ps1 index 3e21d13f3..9ff1503df 100644 --- a/ContainerHandling/New-NavContainer.ps1 +++ b/ContainerHandling/New-NavContainer.ps1 @@ -2248,7 +2248,7 @@ if (-not `$restartingInstance) { New-Item -Path $dotnetAssembliesFolder -ItemType Directory -ErrorAction Ignore | Out-Null Write-Host "Creating .net Assembly Reference Folder for VS Code" - Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($dotnetAssembliesFolder) + Invoke-ScriptInBcContainer -containerName $containerName -scriptblock { Param($dotnetAssembliesFolder, [System.Version] $Version) $serviceTierFolder = (Get-Item "C:\Program Files\Microsoft Dynamics NAV\*\Service").FullName @@ -2262,7 +2262,9 @@ if (-not `$restartingInstance) { if (Test-Path $mockAssembliesPath -PathType Container) { $paths += $mockAssembliesPath } - $paths += "C:\Program Files (x86)\Open XML SDK" + if ($version.Major -lt 21) { + $paths += "C:\Program Files (x86)\Open XML SDK" + } $paths | % { $localPath = Join-Path $dotnetAssembliesFolder ([System.IO.Path]::GetFileName($_)) @@ -2283,7 +2285,11 @@ if (-not `$restartingInstance) { new-item -itemtype symboliclink -path $ServiceTierAddInsFolder -name "RTC" -value (Get-Item $RtcFolder).FullName | Out-Null } } - } -argumentList (Get-BcContainerPath -containerName $containerName -path $dotnetAssembliesFolder) + + if ($version.Major -ge 21) { + Remove-Item -Path (Join-Path $dotnetAssembliesFolder 'assembly\DocumentFormat.OpenXml.dll') -Force -ErrorAction SilentlyContinue + } + } -argumentList (Get-BcContainerPath -containerName $containerName -path $dotnetAssembliesFolder), $version } if ($customConfig.ServerInstance) { diff --git a/CreateScript.ps1 b/CreateScript.ps1 index df98e4ba8..c8812f60d 100644 --- a/CreateScript.ps1 +++ b/CreateScript.ps1 @@ -367,14 +367,16 @@ $script:wizardStep++ switch ($script:thisStep) { $Step.BcContainerHelper { - # ____ _____ _ _ _ _ _ - # | _ \ / ____| | | (_) | | | | | | - # | |_) | ___| | ___ _ __ | |_ __ _ _ _ __ ___ _ __| |__| | ___| |_ __ ___ _ __ - # | _ < / __| | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__| __ |/ _ \ | '_ \ / _ \ '__| - # | |_) | (__| |____ (_) | | | | |_ (_| | | | | | __/ | | | | | __/ | |_) | __/ | - # |____/ \___|\_____\___/|_| |_|\__\__,_|_|_| |_|\___|_| |_| |_|\___|_| .__/ \___|_| - # | | - # |_| +Write-Host -ForegroundColor Yellow @' + ____ _____ _ _ _ _ _ + | _ \ / ____| | | (_) | | | | | | + | |_) | ___| | ___ _ __ | |_ __ _ _ _ __ ___ _ __| |__| | ___| |_ __ ___ _ __ + | _ < / __| | / _ \| '_ \| __/ _` | | '_ \ / _ \ '__| __ |/ _ \ | '_ \ / _ \ '__| + | |_) | (__| |____ (_) | | | | |_ (_| | | | | | __/ | | | | | __/ | |_) | __/ | + |____/ \___|\_____\___/|_| |_|\__\__,_|_|_| |_|\___|_| |_| |_|\___|_| .__/ \___|_| + | | + |_| +'@ if (!$skipContainerHelperCheck) { $module = Get-InstalledModule -Name "BcContainerHelper" -ErrorAction SilentlyContinue if (!($module)) { @@ -386,6 +388,10 @@ $Step.BcContainerHelper { Write-Host -ForegroundColor Red "Use 'Install-Module BcContainerHelper -force' to install in PowerShell" return } + elseif ($module.Version -eq "0.0") { + Write-Host -ForegroundColor Green "You are running BcContainerHelper developer version" + Write-Host + } else { $myVersion = $module.Version.ToString() $prerelease = $myVersion.Contains("-preview") @@ -525,8 +531,9 @@ $Step.Version { -options ([ordered]@{ "LatestSandbox" = "Latest Business Central Sandbox" "LatestOnPrem" = "Latest Business Central OnPrem" + "Public Preview" = "Public Preview of Business Central Sandbox is typically available one month before we ship next major" "Next Major" = "Insider Business Central Sandbox for Next Major release (requires insider SAS token from http://aka.ms/collaborate)" - "Next Minor" = "InsiderBusiness Central Sandbox for Next Minor release (requires insider SAS token from http://aka.ms/collaborate)" + "Next Minor" = "Insider Business Central Sandbox for Next Minor release (requires insider SAS token from http://aka.ms/collaborate)" "SpecificSandbox" = "Specific Business Central Sandbox build (requires version number)" "SpecificOnPrem" = "Specific Business Central OnPrem build (requires version number)" "NAV2018" = "Specific NAV 2018 version" @@ -576,6 +583,12 @@ $Step.Version2 { $type = $predef.Substring(6) $version = '' } + elseif ($predef -like "Public Preview") { + $type = "Sandbox" + $version = '' + $storageAccount = "bcpublicpreview" + $select = 'latest' + } elseif ($predef -like "Next*") { $type = "Sandbox" $version = '' @@ -694,7 +707,10 @@ $Step.Country { $versionno = $version if ($versionno -eq "") { - $versionno = (Get-BcArtifactUrl -storageAccount $storageAccount -type $type -country "$(if ($type -eq 'sandbox') {"at"} else {"us"})" -sasToken $sasToken).split('/')[4] + $searchCountry = "us" + if ($type -eq 'sandbox') { "at" } + $aurl = Get-BcArtifactUrl -storageAccount $storageAccount -type $type -country $searchCountry -sasToken $sasToken -select $select + $versionno = $aurl.split('/')[4] } $majorVersion = [int]($versionno.Split('.')[0]) $countries = @() diff --git a/Misc/Download-Artifacts.ps1 b/Misc/Download-Artifacts.ps1 index 4e43b0159..e1638bdf9 100644 --- a/Misc/Download-Artifacts.ps1 +++ b/Misc/Download-Artifacts.ps1 @@ -180,8 +180,9 @@ try { $prerequisiteComponents = Get-Content $prerequisiteComponentsFile | ConvertFrom-Json Write-Host "Downloading Prerequisite Components" $prerequisiteComponents.PSObject.Properties | % { + $skip = ($_.Name -eq "Prerequisite Components\Open XML SDK 2.5 for Microsoft Office\OpenXMLSDKv25.msi") -and (([System.Version]$appManifest.Version).Major -ge 21) $path = Join-Path $platformArtifactPath $_.Name - if (-not (Test-Path $path)) { + if ((-not $skip) -and (-not (Test-Path $path))) { $dirName = [System.IO.Path]::GetDirectoryName($path) $filename = [System.IO.Path]::GetFileName($path) if (-not (Test-Path $dirName)) { diff --git a/Misc/Get-BCArtifactUrl.ps1 b/Misc/Get-BCArtifactUrl.ps1 index ced64160e..ce9dc49ba 100644 --- a/Misc/Get-BCArtifactUrl.ps1 +++ b/Misc/Get-BCArtifactUrl.ps1 @@ -57,7 +57,7 @@ try { Write-Host -ForegroundColor Yellow 'On-premises build for 17.14 was replaced by 17.15.35135.0, using this version number instead' $version = '17.15.35135.0' } - elseif ($version -like '16.19*') { + elseif ($version -like '16.18*') { Write-Host -ForegroundColor Yellow 'On-premises build for 16.18 was replaced by 16.19.35126.0, using this version number instead' $version = '16.19.35126.0' } diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index a95bab8ce..821c17dfe 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,5 +1,8 @@ 4.0.3 Support for specifying STANDARD or EXTENDED in UploadImportAndApply-ConfigPackageInBcContainer +Issue #2685 Typo in Get-BcArtifactUrl +Issue #2681 New-BcContainerWizard doesn't seem to support Public Preview Versions +Issue #2678 Compiling baseapp 21.x causes a compile error on .Net types 4.0.2 Issue #2664 Image rebuild forced by different tags of a generic dev image