microsoft / navcontainerhelper

Official Microsoft repository for BcContainerHelper, a PowerShell module, which makes it easier to work with Business Central Containers on Docker.
MIT License
376 stars 243 forks source link

Compiling a Test App #1200

Closed bennyvanlyssebettens closed 4 years ago

bennyvanlyssebettens commented 4 years ago

Container Image: mcr.microsoft.com/businesscentral/onprem:16.3.14085.14238-w1-ltsc2019 AL Compiler: 5.0.312966

I have a test-code-unit

codeunit 50147 "Test Attachment"
{
    Subtype = Test;
    TestPermissions = Disabled;

    var
        IsInitialized: Boolean;

    [Test]
    procedure TestAttachment()
    var
        Attachment: record Attachment;
        ProjectGeneralLibrary: codeunit "Project General Library";
        LibraryMarketing: Codeunit "Library - Marketing";

    begin
        ProjectGeneralLibrary.Initialize(Codeunit::"Test Attachment", isInitialized);
        LibraryMarketing.CreateAttachment(Attachment);
    end;
}

I receive the following error when I try to compile this App

C:\Run\KTN\Source\test\src\TestAttachment.Codeunit.al(18,43): error AL0133: Argument 1: cannot convert from 'Record Attachment' to 'var MissingTypeSymbol'

Installed extensions in this docker, I 'm pretty sure It contains the project (main App) and all the necessary test toolkit stuff

image

And knows comes the strange part... If I use VS Code studio code with the same codebase and I press package... I dont' receive the error. My launch.json directs to different container since VS Code runs local on my machine ( Windows 10 generic image + artifacts 16.3.14085.14238-w1 )

image

And even stranger, if I install this Test app in the first container, where the compilation failed, it get's published & synced. No problem at all.

I don't get it...

freddydk commented 4 years ago

I have no idea what this is, but it doesn't seem related to docker. I have no idea where the Attachment record is defined, but it seems like a missing reference to this.

freddydk commented 4 years ago

Please re-open with more information if the problem persists.