-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assembly Dependency Error between SQL Server Module and NAV Tools in BC Container #3529
Comments
Please supply the log from the generation of the container as well for me to see which version of OS, BC etc. |
I have added the full log to the "Full output of scripts" section. |
Version <= "23.2" works as expected. |
Tried this on my machine:
works fine. When you say 23.2 works fine - did you test 23.5? (I would assume that the problem would start with 24) |
Would it be possible to test this with HyperV isolation? (listed as disabled on your machine) |
I have hit some similar problem when I was trying to upgrade some environment to 23.3. In my case, when I imported first the sqlserver module and then the BC admin module, cmdlet "Export-NAVApplication" ended with error:
I have found that this was problem on my Windows 2019 server and not on Windows 2022 server, which have newer SqlSrv32.dll drivers When I separated the usage of SqlServer module and BC admin module into separate background jobs, it works ok. |
Btw, I was using the "add_AssemblyResolve" trick which is used in the Restore-BcDatabaseFromArtifacts function, but it stopped to work when I moved my management scripts to Pwsh7 and I removed it and separated the SqlServer usage from the BC admin module usage as described in previous post. It means it could be combination of Pwsh7 vs Powershell5 vs Windows 2019 vs Windows 2022 vs SqlSrv32.dll driver version... |
Could be connected with #3527 |
Separating into different sessions is also my colleague's solution. |
Yes i checked that one but it didn't help either. Im wondering if you are using sqlps or the SQLServer module while testing? Maybe that's a problem? In my case the container helper is using the SQLServer Module. To give you a few more details:
Followed by installing the container helper (latest) and creating a new container (latest). No further modifications are made to the underlying machine and no modifications to the container aswell. I manged to export the database with 23.2 with the same underlying configuration successfully btw. |
The Export to bacpac happens inside the container. If you run other scripts inside the container, which loads SqlServer in PS5 (it isn't installed), then that might be the reason for the failure. If you try to Remove-BcContainerSession -containerName $containerName before Exporting to bacpac - or set $bccontainerHelperConfig.usePsSession = $false - that would be worth trying out. I cannot repro the problem |
I seem to have the same problem. Trying to get a local Business Central instance running in Docker for development purposes.
I can access the BC tenant in my browser but only with the default Cronus database. Now trying to insert a database export from our BC Online production tenant.
Results in the same logs an identical error:
Also using PowerShell 7. Quite new to this, not sure if there is something I can do to fix this? (I have no export of a v23 database so cannot try if it works on this version. Inserting the v24 bacpac into a v23 BC Docker results in "incorrectly formed" error by SQL Server.) |
PowerShell v5 produces to same error
|
More specifically, the error raises in
|
Any solution for this yet? Just tried to restore the database for my new container and got the same error message as above :( |
@awpehl - and if you run with PS5 it works ? |
You need to be running PS5 inside the container |
I already tried PS5 for the general script but didn't work. How can I run the PS5 inside the container? |
run |
Worked for me! Thanks 👍 |
Just note that now everything else inside the container runs PowerShell 5 as well - and as a result of this, runs slower. |
Describe the issue
There is a compatibility problem between NAVTools DLLs and SQL Server Tools DLLs. This means that required dependencies cannot be resolved and this leads to an assembly error. Here the modules probably have to be loaded in separate sessions with New-PSSession & Invoke-Command { SQL Cmds ... }
Scripts used to create container and cause the issue
Full output of scripts
Screenshots
Additional context
This seems to be a general problem when loading the DLLS between NAVTools and SQLServer Tools.
The text was updated successfully, but these errors were encountered: