Skip to main content

Notifications

Small and medium business | Business Central, N...
Suggested answer

Assert codeunit not found

Posted on by 382

Hello everyone,

I was creating a testing code unit for a custom table. But when I am trying to use "Assert" codeunit as a variable it is raising an error that "Assert codeunit not found'. I am not using dockers as I don't know how to use it. Maybe I have to install NavTestToolKit first. But I do not know how to install it. Kindly help. 

  • RE: Assert codeunit not found

    Hey Mohana,

    on putting "test":"1.0.0.0", I'm getting the following error:

    1. "'test' is being deprecated in the versions: '4.0' or greater. This property is being deprecated in favor of explicit dependencies on the test libraries extensions. This warning will become an error in a future release."

    2. "A package with publisher 'Microsoft', name 'Test', and a version compatible with '1.0.0.0' could not be found in the package cache folders: c:\\Users\\anas.naeemi\\Documents\\AL\\CheckPageOpen\\.alpackages",

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,077 Super User 2024 Season 2 on at
    RE: Assert codeunit not found

    "test": "1.0.0.0" should work

  • RE: Assert codeunit not found

    can you write down the parameters with their version?

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,077 Super User 2024 Season 2 on at
    RE: Assert codeunit not found

    Did you install as well? Install-NAVApp?

    Add test: parameter like application and platform in app.json

    Download symbols

    try now

  • RE: Assert codeunit not found

    I have installed it but still not showing up in AL Object designer.

    pastedimage1680767585154v1.png

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,077 Super User 2024 Season 2 on at
    RE: Assert codeunit not found

    Please run this command first

    Import-Module 'C:\Program Files\Microsoft Dynamics 365 Business Central\210\Service\NavAdminTool.ps1'

    Path may change depending on the version

  • RE: Assert codeunit not found

    The term 'Publish-NAVApp' is not recognized as the name of a cmdlet, function, script file, or

    operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try

    again.

  • RE: Assert codeunit not found

    The thing is that in my powershell no NAV commands are running.

  • Suggested answer
    Mohana Yadav Profile Picture
    Mohana Yadav 59,077 Super User 2024 Season 2 on at
    RE: Assert codeunit not found

    You have to install like the other business central apps.

    learn.microsoft.com/.../devenv-how-publish-and-install-an-extension-v2

  • RE: Assert codeunit not found

    I got the folder but there is no setup for installing libraries. can you show me?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,113 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,918 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans