Monday, March 9, 2020

MSDYN365BC 2019 Wave 2 - Upgrading an Modified C/AL Database - Part 2.

Hi Readers,

Thanks for the great response to this series.

In this article, we will setup the Microsoft Base App (From Business Central 2019 Wave 2) for our Upgrade Merge.

Consider this as Restoring a Target Database From Product DVD that we will merge our customization on. As in Business Central 2019 Wave 2, there are no objects we will setup the Base Application that we will use in future articles.

#MSDYN365BC #BC2019Wave2

For other Articles in this series Refer Here.



** Again as I said earlier, This customization is just for Demo. This can be easily converted to an AL Extension. I am not suggesting to use this approach, I am just using this for this demo.

To Start With -

1. Download & Extract Business Central 2019 Wave 2 which is compatible with your Business Central 14 database. As we discussed earlier I will be using Business Central 15 (Cumulative Update 03).

2. Open Source Folder inside BaseApp Folder from Product DVD as shown below.



3. Extract Base Application.Source in a Folder.
I am extracting in D:\Blog Folder.


4. Open Extracted Folder in VS Code.

File - Open Folder.
Select Folder.



5. As we know even Extension needs launch.json and this base app will not have it. So Next step is to generate Launch.Json.

To Generate Launch.Json, we will try to Build the Extension.
Use Ctrl+Shift+P to open Command Palette, and Search of Run Build Task.


6. Update Launch.Json Parameters based on your service Tier. Following Parameters need to be set -

  1. serverInstance.
  2. authentication.
  3. port.



7. Try to Build the Base App Again using Shortcut Ctrl+Shift+B.

When you will try to Build the Base App now System will generate an error message (in the output window) - Error: The package could not be created.



8. Now Click on any file to Generate Problems. When you click on a file you will see 3K+ under Problems Section.

We can skip warning but we need to resolve all errors. If you see all errors are related to Dotnet Component Missing.



9. Next, we need to setup Dotnet References for all these Missing DotNet Assemblies.
To Setup Missing Dotnet References we will need to Map Following Paths where all Dotnet Component are used in Business Central 2019 Wave 2.

** This list may change with future releases of Business Central on-prem as microsoft might add new Dotnet Refrences.

  • ./.netpackages
  • C:\Program Files\Assemblies
  • C:\Program Files\Microsoft Dynamics 365 Business Central\150
  • C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\150
  • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2
  • C:\Program Files (x86)\Reference Assemblies\Microsoft\WindowsPowerShell\
  • C:\Windows\Microsoft.Net\assembly


10. Where to Setup Referenced .Net Assemblies?

Open Workspace settings using Command Palette, and select Open Workspace Settings as shown below.

Under Extension, Select AL Language Extension Configuration and add all the above-listed paths in Add Item.



11. Reload VS Code Environment. Use the command in Command Palette "Developer Reload Window" or close and open VS Code.

12. After Reload you will see only warnings in the Problem Window as shown below.


13. Now we are ready to build the App. Lets' try that using Ctrl+Shift+B and check results.
So with all these steps our Base App Ready to add customizations.



In the Next Article, we will discuss Merging those customizations in the Last article.

Stay tuned for more.
Hope you find it useful.

Let me know your views as a comment on this article.

Regards,
Saurav Dhyani
https://saurav-nav.blogspot.com

2 comments:

  1. Hi! Saurav, Thanks for the article! I have one query can we follow the same above mentioned up-gradation process for Cloud Bc365 not on-premise?

    ReplyDelete
    Replies
    1. No Abhishek,

      Before upgrading to SaaS you will have to move all customs to AL Extension.

      Delete