Skip to content

Commit

Permalink
check for packaging dll (#3266)
Browse files Browse the repository at this point in the history
Apparently the packaging DLL is not availbale in version 15 and earlier.

Co-authored-by: freddydk <freddydk@users.noreply.github.com>
  • Loading branch information
freddydk and freddydk committed Dec 7, 2023
1 parent 0bb4fd7 commit b6b4a67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion AppHandling/Compile-AppInNavContainer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,9 @@ try {
else {
Add-Type -Path (Join-Path $alcPath Newtonsoft.Json.dll)
Add-Type -Path (Join-Path $alcPath System.Collections.Immutable.dll)
Add-Type -Path (Join-Path $alcPath System.IO.Packaging.dll)
if (Test-Path (Join-Path $alcPath System.IO.Packaging.dll)) {
Add-Type -Path (Join-Path $alcPath System.IO.Packaging.dll)
}
Add-Type -Path (Join-Path $alcPath Microsoft.Dynamics.Nav.CodeAnalysis.dll)

$packageStream = [System.IO.File]::OpenRead($symbolsFile)
Expand Down
4 changes: 3 additions & 1 deletion HelperFunctions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,9 @@ function GetAppInfo {
Add-Type -AssemblyName System.Text.Encoding
LoadDLL -Path (Join-Path $alcDllPath Newtonsoft.Json.dll)
LoadDLL -Path (Join-Path $alcDllPath System.Collections.Immutable.dll)
LoadDLL -Path (Join-Path $alcDllPath System.IO.Packaging.dll)
if (Test-Path (Join-Path $alcDllPath System.IO.Packaging.dll)) {
LoadDLL -Path (Join-Path $alcDllPath System.IO.Packaging.dll)
}
LoadDLL -Path (Join-Path $alcDllPath Microsoft.Dynamics.Nav.CodeAnalysis.dll)
$assembliesAdded = $true
}
Expand Down

0 comments on commit b6b4a67

Please sign in to comment.