merging problem from Nav 2015 to 2016

Hi experts,


I am trying the merging through powershell but it throwing error ...i tried by taking standard tables then its working fine but when i tried for customized objects in that objects some objects are working fine and some objects getting error.

can you please send me the reason

my objects is compilled and its runing fine also 



WARNING: UnhandledErrorMessage

Compare-NAVApplicationObject : The type initializer for 'Microsoft.Dynamics.Nav.Model.TypeSystem.WindowsLanguageHelper' threw an exception.
At line:1 char:2
+ Compare-NAVApplicationObject -OriginalPath "F:\Nav2\tables2015" -Mod ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Compare-NAVApplicationObject], TypeInitializationException
+ FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.Dynamics.Nav.Model.Tools.Cmdlets.CompareNavApplicationObject





  • Hi,
    Please find the useful command below for upgradation.Make sure you are hitting right command.

    Compare-NAVApplicationObject -OriginalPath ‘D:\Shyam\Original’ -ModifiedPath ‘D:\Shyam\Modified’ -DeltaPath ‘D:\Shyam\Delta’

    Update-NAVApplicationObject –DeltaPath ‘D:\Shyam\Delta’ -TargetPath ‘D:\Shyam\Target’ -ResultPath ‘D:\Shyam\Result’

    Join-NAVApplicationObjectFile -Source ‘D:\Shyam\Result\*.txt’ -Destination ‘D:\Shyam\FinalMergedObjects\all-merged.txt’

    Merge-NAVApplicationObject -OriginalPath ‘D:\Shyam\Original’ -TargetPath ‘D:\Shyam\Target’ -ModifiedPath ‘D:\Shyam\Modified’ -ResultPath ‘D:\Shyam\Result’
  • In reply to shyam pandey:

    Adding to this, before executing all these commands first you need to import NAV cmdlets if you're executing command through powershell.

    Import-Module "C:\Program Files (x86)\Microsoft Dynamics NAV\90\RoleTailored Client\Microsoft.Dynamics.Nav.Model.Tools.psd1" -force

    If you're using NAV 2016 Development shell then no need to import NAV cmdlets it will import itself on opening the development shell.
  • In reply to shyam pandey:

    thanks for reply ...

    Compare-NAVApplicationObject -OriginalPath ‘D:\Shyam\Original’ -ModifiedPath ‘D:\Shyam\Modified’ -DeltaPath ‘D:\Shyam\Delta’
    i used this command in powershell then the error is coming like that i checked in delta folder there it stopped in CaptionMl --property ..i removed manually that CaptionML and OptionCaptionML in navision .then it executing fine ...

    but it take more time to remove all captionMl in manually.. so is there any alternate solution to solve my issue

    my version is Dynamics.80.NA.1538476.DVD---->(2015)

  • In reply to DivakarJ:

    To Update CaptionML..

    when you compare two versions of the same object with two different languages, you will see extensive differences.
    You can choose to export captions into text files before you compare or merge application objects.

    you can use the Export-NAVApplicationObjectLanguage Windows PowerShell cmdlet to export specific languages from the objects before you merge..
    You can then use the Import-NAVApplicationObjectLanguage cmdlet to import the captions after the merge.

    Also I would recommend you to use Merge-NAVApplicationObject cmdlet instead of Compare-NAVApplicationObject anyway both does the same job but on using Merge-NAVApplicationObject it will create a .conflict files, source,delta and target files in separate folder which you can manually merge later using compare tool by identifying the difference.

    Merge-NAVApplicationObject -OriginalPath .\ORIGINAL -TargetPath .\TARGET -ModifiedPath .\MODIFIED -ResultPath .\RESULT
  • In reply to Harikiran BM:

    ya merge directly. the command you entered will ask the permission. so go for merge cmd.