AL icon indicating copy to clipboard operation
AL copied to clipboard

September Issue: txt2al issue

Open alanb999 opened this issue 9 years ago • 2 comments

I have successfully exported object from Dynamics NAV database into the new format using... Export-NAVApplicationObject -DatabaseName FinancialsUS -Path c:\demo\test.txt -DatabaseServer localhost\SQLEXPRESS -LogPath c:\demo\log -Force -ExportToNewSyntax -Username sa -Password mypassword

The following command was executed from both the Container Command Prompt, and standard Command Prompt running as administrator with the same error results below.

"C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\txt2al" --source="c:\demo\test.txt" --target="C:\demo\AL" --rename

Unhandled Exception: System.ArgumentException: Illegal characters in path. at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.NormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths) at System.IO.Path.GetFullPathInternal(String path) at Txt2Al.CommandLineOptionsExtensions.Sanitize(AlExporterCommandLineOptions options) at Txt2Al.Program.Main(String[] args)

The Txt2Al tool worked in previous developer release. Please advise how to address the error.

alanb999 avatar Sep 20 '17 16:09 alanb999

Can you try with source="c:\demo" i.e. don't specify the file name?

StanislawStempin avatar Sep 21 '17 09:09 StanislawStempin

I moved the exported NAV object file (new format) to a dedicated folder 'c:\codetest' and successfully executed the following command from the Command prompt (no ending slashes): "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\txt2al" --source='c:\codetest' --target='C:\codetest\AL' --rename

FYI, the new folder was not accessible from the Container Command Prompt.

I also successfully tested the following command from the Container Command Prompt: "C:\Program Files (x86)\Microsoft Dynamics NAV\110\RoleTailored Client\txt2al" --source="c:\demo\NAVObjects" --target="C:\demo\NAVObjects\AL" --rename

alanb999 avatar Sep 21 '17 15:09 alanb999