RSS

How-To Compile a Business Central App/Extenssion Manually

03 Mar
How-To Compile a Business Central App/Extenssion Manually

Do you want to know how to compile your Business Central app manually as VS Code does? Then you will get started with this blog post.

It all starts with the ALLanguage.vsix file.
On the installation DVD it can be found at the path:
ModernDev\program files\Microsoft Dynamics NAV\130\AL Development Environment

If you use docker it can be found at C:\Run\*.vsix

The VSIX file contains the AL language and the compiler.
This file is basically a ZIP folder. Rename it to .zip and extract it to C:\Build\vsix

You can compile your app by using the command prompt or by using powershell.
Lets say that the app is located at: C:\GIT\MyProject\App”
Then we can run the following code in the command prompt to compile our app:
cd C:\build\vsix\extension\bin
alc.exe /project:"C:\GIT\MyProject\App" /packagecachepath:"C:\GIT\MyProject\App\.alpackages" /out:"C:\GIT\MyProject\App\MyApp.app"


If you would like to use powershell it would look like this:

$alcPath = 'C:\build\vsix\extension\bin'
$appProjectFolder = 'C:\GIT\MyProject\App'
$appSymbolsFolder = 'C:\GIT\MyProject\App\.alpackages'
$appOutputFile = 'C:\GIT\MyProject\App\MyApp.app'
Set-Location -Path $alcPath
& .\alc.exe /project:$appProjectFolder /packagecachepath:$appSymbolsFolder /out:$appOutputFile

If you want to do this with powershell and docker there is already an existing cmdlet that does this which I got the inspiration from.
The cmdlet is Compile-AppInNavContainer.ps1 and is a part of the navcontainerhelper.






 
Leave a comment

Posted by on 2019-03-03 in Okategoriserade

 

Tags: , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
The BC Docs Librarian

Tips and news for AL programmers

Stefan Maroń

Dynamics 365 Business Central

James Pearson

Thoughts about Dynamics 365 Business Central, Git, Azure DevOps, PowerShell, Automated Testing, Visual Studio Code...and maybe some other stuff

Roberto Stefanetti BLOG

MVP & MCT Microsoft Dynamics 365 Business Central, Powershell, Azure, SQL Server

JoeBrown

DevOps starts with culture!

Comments for DevOps ABCs Blog

Reflections from the ERP field

DevOps ABCs Blog

Reflections from the ERP field

Dynamics 365 Business Central for Partners

Reflections from the ERP field

Freddys blog

Learn something new... - then Teach someone!

Stefano Demiliani Technical Blog

Reflections from the ERP field

David Worthington's NAV Performance Blog

Micosoft Dynamics NAV Performance Testing & Optimization

Freddys Blog

Reflections from the ERP field

Marije Brummel Blog | Business Central, Azure and more...

Design Patterns, Performance, Clean Code

Vjeko.com

Ideas in the cloud

Goprowe AB

Reflections from the ERP field

ArcherPoint

Reflections from the ERP field

The NAV Viking´s Blog

- Sharing my experience in the Dynamics NAV world

Comments for

Reflections from the ERP field

Nav Can Be Fun

Its Really Fun to Work with Microsoft Dynamics Nav / D365 Business Central

%d bloggers like this: