Closed amea20 closed 1 year ago
I can send the app file and script with it if you like. This seems like it might not be copying the newer DLLs to the assemblyProbingPaths, only the older DLLs from C:\Windows\Microsoft.NET\assembly
Hi there Freddy,
Please provide an update concerning this matter.
Could you try the pre-release version of BcContainerHelper. I think this has been resolved in that.
Thanks
Thanks Freddy. I'm running it now with 4.0.15-preview921.
Sadly, it still returned the same errors as above.
Could you provide the full log?
BcContainerHelper is version 4.0.15-preview921
BcContainerHelper is running as administrator
HyperV is Enabled
UsePsSession is True
Host is Microsoft Windows 10 Pro - 10.0.19044.2728
Docker Client Version is 23.0.1
Docker Server Version is 23.0.1
Downloading application artifact /sandbox/22.0.54157.54540/gb
Downloading C:\Users\ahmed.elagha\AppData\Local\Temp\0eb9301a-1272-47b3-8e87-f1fe412cfbc3.zip
Downloading using WebClient
Unpacking application artifact to tmp folder using 7zip
Fetching all docker images
Fetching all docker volumes
INFO: Windows 10 21H1/21H2 images are not yet available, using 2004 as these are found to work better than 20H2 on 21H1/21H2
Using image mcr.microsoft.com/businesscentral:10.0.19041.1415-dev
Disabling Health Check (always report healthy)
Creating Container bconprem
Style: onprem
Multitenant: No
Version: 22.0.54157.54540
Platform: 22.0.54512.0
Generic Tag: 1.0.2.14-dev
Container OS Version: 10.0.19041.1415 (2004)
Host OS Version: 10.0.19044.2728 (21H2)
WARNING: Host OS is Windows 10 21H1 or newer and Container OS is 2004, defaulting to process isolation. If you experience problems, add -isolation hyperv.
Using process isolation
Using locale en-GB
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Using license file C:\App\Licenses\BC21-License.bclicense
Additional Parameters:
--volume "C:\work\App:C:\BCWork"
Files in C:\ProgramData\BcContainerHelper\Extensions\bconprem\my:
- AdditionalOutput.ps1
- license.bclicense
- MainLoop.ps1
- SetupVariables.ps1
- updatehosts.ps1
Creating container bconprem from image mcr.microsoft.com/businesscentral:10.0.19041.1415-dev
6ef7166fd3bb1cbed4fd3788ae47688945882edabfd6f49074c72bcb542c08ee
Waiting for container bconprem to be ready
Using artifactUrl https://bcpublicpreview.azureedge.net/sandbox/22.0.54157.54540/gb
Using installer from C:\Run\210-new
Installing Business Central
Installing from artifacts
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
c:\dl\sandbox\22.0.54157.54540\platform\ServiceTier\Program Files
c:\dl\sandbox\22.0.54157.54540\platform\ServiceTier\System64Folder
Copying PowerShell Scripts
c:\dl\sandbox\22.0.54157.54540\platform\WindowsPowerShellScripts\Cloud\NAVAdministration
c:\dl\sandbox\22.0.54157.54540\platform\WindowsPowerShellScripts\WebSearch
Copying Web Client Files
c:\dl\sandbox\22.0.54157.54540\platform\WebClient\Microsoft Dynamics NAV
Copying ModernDev Files
c:\dl\sandbox\22.0.54157.54540\platform
c:\dl\sandbox\22.0.54157.54540\platform\ModernDev\program files\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\dl\sandbox\22.0.54157.54540\gb\ConfigurationPackages
Copying Test Assemblies
C:\dl\sandbox\22.0.54157.54540\platform\Test Assemblies
Copying Extensions
C:\dl\sandbox\22.0.54157.54540\gb\Extensions
Copying Applications
C:\dl\sandbox\22.0.54157.54540\platform\Applications
Copying Applications.GB
C:\dl\sandbox\22.0.54157.54540\gb\Applications.GB
Copying dependencies
Copying ReportBuilder
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for CRONUS on localhost\SQLEXPRESS
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing license file
Stopping Business Central Service Tier
Installation took 114 seconds
Installation complete
Initializing...
Setting host.docker.internal to 192.168.0.36 in container hosts file (copy from host hosts file)
Setting gateway.docker.internal to 192.168.0.36 in container hosts file (copy from host hosts file)
Setting kubernetes.docker.internal to 127.0.0.1 in container hosts file (copy from host hosts file)
Setting host.containerhelper.internal to 172.31.144.1 in container hosts file
Starting Container
Hostname is bconprem
PublicDnsName is bconprem
Using NavUserPassword Authentication
Creating Self Signed Certificate
Self Signed Certificate Thumbprint DCDE6D0E3987D7657BD3B481FE114ABC5E21249D
DNS identity bconprem
Modifying Service Tier Config File with Instance Specific Settings
Starting Service Tier
Registering event sources
Creating DotNetCore Web Server Instance
Using application pool name: BC
Using default container name: NavWebApplicationContainer
Copy files to WWW root C:\inetpub\wwwroot\BC
Create the application pool BC
Create website: NavWebApplicationContainer without SSL
Update configuration: navsettings.json
Done Configuring Web Client
Using license file 'c:\run\my\license.bclicense'
Import License
Creating http download site
Setting SA Password and enabling SA
Creating bcadmin as SQL User and add to sysadmin
WARNING: This license is not compatible with this version of Business Central.
Creating SUPER user
WARNING: This license is not compatible with this version of Business Central.
WARNING: This license is not compatible with this version of Business Central.
Container IP Address: 172.31.151.31
Container Hostname : bconprem
Container Dns Name : bconprem
Web Client : http://bconprem/BC/
Dev. Server : http://bconprem
Dev. ServerInstance : BC
Setting bconprem to 172.31.151.31 in host hosts file
Files:
http://bconprem:8080/ALLanguage.vsix
WARNING: You are running a container which is 377 days old.
Microsoft recommends that you always run the latest version of our containers.
Container Total Physical Memory is 63.7Gb
Container Free Physical Memory is 36.4Gb
Initialization took 38 seconds
Ready for connections!
Reading CustomSettings.config from bconprem
Creating Desktop Shortcuts for bconprem
Extracting C:\Applications.GB\Base Application.Source.zip
Cleanup old dotnet core assemblies
Creating .net Assembly Reference Folder
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath
Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
Removing dotnet Framework Assemblies
Container bconprem successfully created
Use:
Get-BcContainerEventLog -containerName bconprem to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName bconprem to get debug information about the container
Enter-BcContainer -containerName bconprem to open a PowerShell prompt inside the container
Remove-BcContainer -containerName bconprem to remove the container again
docker logs bconprem to retrieve information about URL's again
Copy C:\Temp\ControlAddins.zip to container bconprem (C:\Program Files\Microsoft Dynamics NAV\ControlAddins.zip)
Publishing C:\ProgramData\BcContainerHelper\Extensions\bconprem\5b43d7a1-3ec0-4472-82ee-73467dfb61ff\Company_App_1.0.0.0.app
Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'OnPrem Permissions', and a version compatible with '21.0.0.0' could not be loaded. Symbols for the requested app OnPrem Perm
issions by Microsoft 21.0.0.0 could not be found in the database.
.netpackages/dotnet.al(315,14): error AL0452: The type 'System.Data.SqlClient.SqlConnection' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyT
oken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(39,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2226,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(319,14): error AL0452: The type 'System.Data.SqlClient.SqlCommand' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToke
n=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(40,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2294,53): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2308,49): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2331,55): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2333,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(8,21): error AL0185: DotNet 'SqlCommand' is missing
.netpackages/dotnet.al(331,14): error AL0452: The type 'System.Data.SqlClient.SqlParameter' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyTo
ken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(9,25): error AL0185: DotNet 'SqlParameter' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(30,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(6,14): error AL0452: The type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' could not be found in assembly 'Microsoft.SharePoint.Client.Runtime, Ve
rsion=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
.netpackages/dotnet.al(323,14): error AL0452: The type 'System.Data.SqlClient.SqlDataReader' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyT
oken=b77a5c561934e089'
.netpackages/dotnet.al(383,14): error AL0451: An assembly named 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found in the as
sembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\220\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\22.0.54512.0, C:\Program Files\Microsoft Dynamics NA
V\220\Service\, C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.13, C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.13'
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(119,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(120,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(121,20): error AL0185: DotNet 'SqlDataReader' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(123,18): error AL0185: DotNet 'SqlParameter' is missing
Exception Script Stack Trace:
at <ScriptBlock>, <No file>: line 41
PowerShell Call Stack:
at Invoke-ScriptInBcContainer, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\ContainerHandling\Invoke-ScriptInNavContainer.ps1: line 71
at <ScriptBlock>, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\AppHandling\Publish-NavContainerApp.ps1: line 293
at Publish-BcContainerApp, C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\AppHandling\Publish-NavContainerApp.ps1: line 144
at <ScriptBlock>, <No file>: line 30
Container Free Physical Memory: 32.3Gb
Services in container bconprem:
- MicrosoftDynamicsNavServer$BC is Running
- MSSQL$SQLEXPRESS is Running
Relevant event log from container bconprem:
- 20230322 05:20:10 - MicrosoftDynamicsNavServer$BC
Server instance: BC
Category: Extensions
ClientSessionId: 00000000-0000-0000-0000-000000000000
ClientActivityId: 00000000-0000-0000-0000-000000000000
ServerSessionUniqueId: ef30d84d-29b5-4887-8c61-8250ec456229
ServerActivityId: 375af4b6-acbe-43e9-bb01-878f0971dfac
EventTime: 03/22/2023 17:20:10
Message Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'OnPrem Permissions', and a version compatible with '21.0.0.0' could not be loaded. Symbols for the requested app OnPrem Pe
rmissions by Microsoft 21.0.0.0 could not be found in the database.
.netpackages/dotnet.al(315,14): error AL0452: The type 'System.Data.SqlClient.SqlConnection' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKe
yToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(39,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2226,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(319,14): error AL0452: The type 'System.Data.SqlClient.SqlCommand' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyTo
ken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(40,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2294,53): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2308,49): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2331,55): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2333,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(8,21): error AL0185: DotNet 'SqlCommand' is missing
.netpackages/dotnet.al(331,14): error AL0452: The type 'System.Data.SqlClient.SqlParameter' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKey
Token=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(9,25): error AL0185: DotNet 'SqlParameter' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(30,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(6,14): error AL0452: The type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' could not be found in assembly 'Microsoft.SharePoint.Client.Runtime,
Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
.netpackages/dotnet.al(323,14): error AL0452: The type 'System.Data.SqlClient.SqlDataReader' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKe
yToken=b77a5c561934e089'
.netpackages/dotnet.al(383,14): error AL0451: An assembly named 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found in the
assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\220\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\22.0.54512.0, C:\Program Files\Microsoft Dynamics
NAV\220\Service\, C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.13, C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.13'
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(119,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(120,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(121,20): error AL0185: DotNet 'SqlDataReader' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(123,18): error AL0185: DotNet 'SqlParameter' is missing
ProcessId: 12560
Tag: 00001YW
ThreadId: 12
CounterInformation:
CustomParameters: {
}
GatewayCorrelationId:
Publish-BcContainerApp Telemetry Correlation Id: 5a730bd2-f51d-4ec4-a3ea-c3644088ebef
Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'OnPrem Permissions', and a version compatible with '21.0.0.0' could not be loaded. Symbols for the requested app OnPrem
Permissions by Microsoft 21.0.0.0 could not be found in the database.
.netpackages/dotnet.al(315,14): error AL0452: The type 'System.Data.SqlClient.SqlConnection' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(39,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2226,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(319,14): error AL0452: The type 'System.Data.SqlClient.SqlCommand' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(40,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2294,53): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2308,49): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2331,55): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2333,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(8,21): error AL0185: DotNet 'SqlCommand' is missing
.netpackages/dotnet.al(331,14): error AL0452: The type 'System.Data.SqlClient.SqlParameter' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(9,25): error AL0185: DotNet 'SqlParameter' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(30,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(6,14): error AL0452: The type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' could not be found in assembly 'Microsoft.SharePoint.Client.Runtime,
Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
.netpackages/dotnet.al(323,14): error AL0452: The type 'System.Data.SqlClient.SqlDataReader' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089'
.netpackages/dotnet.al(383,14): error AL0451: An assembly named 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found in the
assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\220\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\22.0.54512.0, C:\Program Files\Microsoft
Dynamics NAV\220\Service\, C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.13, C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.13'
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(119,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(120,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(121,20): error AL0185: DotNet 'SqlDataReader' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(123,18): error AL0185: DotNet 'SqlParameter' is missing
At C:\Program Files\WindowsPowerShell\Modules\bccontainerhelper\ContainerHandling\Invoke-ScriptInNavContainer.ps1:112 char:13
+ throw $errorMessage
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Extension compi...ter' is missing:String) [], RuntimeException
+ FullyQualifiedErrorId : Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'OnPrem Permissions', and a version compatible with '21.0.0.0' could not be loaded. Symbols for the requested app OnPre
m Permissions by Microsoft 21.0.0.0 could not be found in the database.
.netpackages/dotnet.al(315,14): error AL0452: The type 'System.Data.SqlClient.SqlConnection' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, Publ
icKeyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(39,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2226,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(319,14): error AL0452: The type 'System.Data.SqlClient.SqlCommand' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicK
eyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecSQL.Codeunit.al(40,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2294,53): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2308,49): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2331,55): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXScrutinyFunctions.Codeunit.al(2333,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(8,21): error AL0185: DotNet 'SqlCommand' is missing
.netpackages/dotnet.al(331,14): error AL0452: The type 'System.Data.SqlClient.SqlParameter' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, Publi
cKeyToken=b77a5c561934e089'
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(9,25): error AL0185: DotNet 'SqlParameter' is missing
Src/Codeunits/XXXScrutinySQLExecuteSearch.Codeunit.al(30,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(6,14): error AL0452: The type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' could not be found in assembly 'Microsoft.SharePoint.Client.Runti
me, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
.netpackages/dotnet.al(323,14): error AL0452: The type 'System.Data.SqlClient.SqlDataReader' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, Publ
icKeyToken=b77a5c561934e089'
.netpackages/dotnet.al(383,14): error AL0451: An assembly named 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found in
the assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\220\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\22.0.54512.0, C:\Program Files\Microsoft
Dynamics NAV\220\Service\, C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.13, C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.13'
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(119,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(120,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(121,20): error AL0185: DotNet 'SqlDataReader' is missing
Src/Codeunits/XXXLaserFicheMsgInfo.Codeunit.al(123,18): error AL0185: DotNet 'SqlParameter' is missing
**Event Log output**
Type: System.InvalidOperationException
Message:
Extension compilation failed
error AL1024: A package with publisher 'Microsoft', name 'OnPrem Permissions', and a version compatible with '21.0.0.0' could not be loaded. Symbols for the requested app OnPrem Permissions by Microsoft 21.0.0.0 could not be found in the database.
.netpackages/dotnet.al(315,14): error AL0452: The type 'System.Data.SqlClient.SqlConnection' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Src/Codeunits/TWMScrutinySQLExecSQL.Codeunit.al(39,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/TWMScrutinyFunctions.Codeunit.al(2226,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(319,14): error AL0452: The type 'System.Data.SqlClient.SqlCommand' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Src/Codeunits/TWMScrutinySQLExecSQL.Codeunit.al(40,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/TWMScrutinyFunctions.Codeunit.al(2294,53): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/TWMScrutinyFunctions.Codeunit.al(2308,49): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/TWMScrutinyFunctions.Codeunit.al(2331,55): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/TWMScrutinyFunctions.Codeunit.al(2333,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/TWMScrutinySQLExecuteSearch.Codeunit.al(8,21): error AL0185: DotNet 'SqlCommand' is missing
.netpackages/dotnet.al(331,14): error AL0452: The type 'System.Data.SqlClient.SqlParameter' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Src/Codeunits/TWMScrutinySQLExecuteSearch.Codeunit.al(9,25): error AL0185: DotNet 'SqlParameter' is missing
Src/Codeunits/TWMScrutinySQLExecuteSearch.Codeunit.al(30,24): error AL0185: DotNet 'SqlConnection' is missing
.netpackages/dotnet.al(6,14): error AL0452: The type 'Microsoft.SharePoint.Client.SharePointOnlineCredentials' could not be found in assembly 'Microsoft.SharePoint.Client.Runtime, Version=16.1.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
.netpackages/dotnet.al(323,14): error AL0452: The type 'System.Data.SqlClient.SqlDataReader' could not be found in assembly 'System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
.netpackages/dotnet.al(383,14): error AL0451: An assembly named 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' could not be found in the assembly probing paths 'C:\Program Files\Microsoft Dynamics NAV\220\Service\Add-Ins, C:\Windows\TEMP\Microsoft Dynamics NAV\Add-Ins\22.0.54512.0, C:\Program Files\Microsoft Dynamics NAV\220\Service\, C:\Program Files\dotnet\shared\Microsoft.NETCore.App\6.0.13, C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\6.0.13'
Src/Codeunits/TWMLaserFicheMsgInfo.Codeunit.al(119,24): error AL0185: DotNet 'SqlConnection' is missing
Src/Codeunits/TWMLaserFicheMsgInfo.Codeunit.al(120,21): error AL0185: DotNet 'SqlCommand' is missing
Src/Codeunits/TWMLaserFicheMsgInfo.Codeunit.al(121,20): error AL0185: DotNet 'SqlDataReader' is missing
Src/Codeunits/TWMLaserFicheMsgInfo.Codeunit.al(123,18): error AL0185: DotNet 'SqlParameter' is missing
HResult: -2146233079
I noticed that OnPrem Permissions is not available, despite setting the flag to runSandboxAsOnPrem.
In addition to that, if the .NET AddIns versions have been upgraded to a higher major version, that would be the reason it's failing.
Service Tier is dotnet 6 in 22. In the old days, I would copy: Copying DLLs from C:\Windows\assembly to assemblyProbingPath Copying DLLs from C:\Windows\Microsoft.NET\assembly to assemblyProbingPath Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
to the folder, now I only copy:
Copying DLLs from C:\Program Files\Microsoft Dynamics NAV\220\Service to assemblyProbingPath Copying DLLs from C:\Test Assemblies\Mock Assemblies to assemblyProbingPath
I should add the dotnet 6 dlls.
But... - all of that is not needed when you publish the app. Did you upgrade all your dotnet addins to dotnet 6 or dotnet standard?
Yes, our custom addins have been converted to dotnet standard, but the issues are related to DLLs usually found either in the machine or in Business Central:
Additionally, OnPrem Permissions could not be found even though it was available in previous versions of NextMinor and NextMajor. Is that no longer the case from 22?
I don't know a lot about the dotnet standard / core thingy, but System.Windows.Forms is part of the .NET Framework. It does not exist as part of .NET Standard or .NET Core. I also don't know what onprem permissions is, sorry.
Sorry, the OnPrem Permissions isn't an issue.
It seems that Microsoft.SharePoint.Client.SharePointOnlineCredentials and System.Windows.Forms aren't even being used, so believe they shouldn't be an issue either.
With System.Data, it is found, but missing System.Data.SqlClient and any with the question mark in the icon: Would you know about whether there is an alternative to that?
Looking into this further, I think that since System.Data.SqlClient no longer exists in .NET 6, it has been replaced with Microsoft.Data.SqlClient, which is found in the Business Central Add-ins folder. This would mean that we just need to update our code to fix this.
I will close this now.
Describe the issue When creating a nextminor or nextmajor container, publishing our app fails due to missing dotnet assemblies.
Scripts used to create container and cause the issue
Full output of scripts
Additional context