I have the following Test-Codeunit. This small test is just for testing my unit-testing-task in Azure Devops.
If I publish/package my project, no issues occur and all my apps are deployed (Main App + Test App).
Used compiler on my machine: vscode\extensions\ms-dynamics-smb.al-
5.0.312966\bin\alc.exe
If I run my Azure Devops tasks I get an error on the compilation part of my Test App
C:\Run\KTN\Source\test\src\TestAttachment.Codeunit.al(18,43): error AL0133: Argument 1: cannot convert from 'Record Attachment' to 'var __MissingTypeSymbol__'
Used compiler on the buildserver: C:\Run\KTN\ALCompiler\al-
5.0.312966\extension\bin\win32\alc.exe
Used Docker Image: onprem:16.3.14085.14238-w1-ltsc2019
The function in the codeunit Library-Marketing (Codeunit 131900) contains the correct record-type Attachment.
Business Central Version : onprem:16.3.14085.14238
Anybody who can help me out with this?
Answers
My docker script does this, which doesn't even have an option for which library you get, so it must be pulling that from the docker container itself. Don't see how that could get you a 16.3 container with 16.1 (or whatever version) test libraries.
Import-TestToolkitToBCContainer `
-containerName $containerName `
-includetestlibrariesonly `
-doNotUseRuntimePackages
During your devops build, how are you loading the test libraries? I have a combination of the YAML itself (which doesn't specify a test library version), and a set of powershell scripts that build a docker container and basically use that same docker command as above. It never has an opportunity to decide on a version of the test libraries.
## TEST ##
- powershell: |
$(Agent.BuildDirectory)\apdockerscripts\Import-TestToolkitToNavContainer.ps1
-includeTestLibrariesOnly
displayName: 'Install TestToolkit'
Anyway - it sounds like somehow you have the wrong version of the test libraries in devops. But that is just a guess. There could also be something wrong with the symbols that are getting downloaded in the middle of the devops build. Those are the only two things I can think of that might cause the Library-Marketing.CreateAttachment procedure to be expecting 'var __MissingTypeSymbol__'
Daddy Was a Thief Mod Apk
As You can see, all the packages are installed, even the compiled "Test Project"
Downloaded packages when compiling the Test-App, they come from the docker-container.
As you can see, all the packages are downloaded. The Attachment-record is part of the Base Application.
Now, things are getting more weird... I already told that I could compile both the main app & test app in a local container by pressing F5 in VS Code. If I Publish & Install that compiles "Test Project" Test.App, I don't receive a problem that the attachment-record can't be converted...
On my local copy of the repo the .alpackages was already there , on the buildserver not.
It's build upon compilation based on the app.json.
"application" was missing in the app.json, now all is fine.
I got the problem when I tried to quick upgrade my apps from BC 17 & 19 to 21. Think I spent 4 hours on this in total divided in three turns until I figured that it was this that solved it.
Have you checked the cables?
Have you released the filters?
http://www.navfreak.com