This project is read-only.


Minor error in Processstep Export as FOB


The term 'C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\' is not recognized as the name of a cmdlet, function, script file, or operable program.

This Error is caused by :

Step 1:
& 'c:\Program Files\WindowsPowerShell\Modules\TFSBuild__Export-NAVObjectsAsFOB.ps1' -ResultFob "C:\Builds\2\IT\Build\bin\Build_20150703.2.fob" -NavIde "C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\" -Server localhost -Database "NAVBuild" -LogFolder "C:\Builds\2\IT\Build"Builds\2\IT\Build"

Step 2:
Export-NAVObjectsAsFOB.ps1 takes $NavIde and gives it to

NVR_NAVScripts\Export-NAVApplicationObject -Server $Server -Database $Database -Path $ResultFob -Filter 'Compiled=1' -NavIde $NavIde -LogFolder $LogFolder

Step 3:
in NVR_NAVScripts\NVR_NAVScripts.psm1 function Export-NAVApplicationObject
    if ($NavIde -eq '') 
        $NavIde = $sourceclientfolder+'\finsql.exe'

    #Write-Progress -Activity 'Exporting objects...' 
    #Write-Debug $Command
    $LogFile = (Join-Path -Path $LogFolder -ChildPath naverrorlog.txt)

    $params = "Command=ExportObjects`,Filter=`"$Filter`"`,ServerName=$Server`,Database=`"$Database`"`,LogFile=`"$LogFile`"`,File=`"$path`""
    & $NavIde $params | Write-Output
So it maybe it calls

C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\ $params

and not C:\Program Files (x86)\Microsoft Dynamics NAV\80\RoleTailored Client\finsql.exe $params

My quickhack solutions was:
    if (!$NavIde)
        $NavIde = $sourceclientfolder+'\finsql.exe'
    //QF START
    if ($NavIde -notcontains '\finsql.exe')
        $NavIde = $NavIde+'\finsql.exe'
    //QF END
The good news are thats the first green Build :)

kindly regards Erik
Closed Jul 7, 2015 at 9:47 AM by kine
Wrongly configured build definition.


kine wrote Jul 7, 2015 at 9:47 AM

You do not need to change anything if you set correctly the NavIde Parameter of the build definition. It should include the finsql.exe too... ;-)

I know that it is named "NAV Ide Path", but this path is including the exe file to execute (in this way it will work even when the finsql.exe is renamed in some future version - but it is just hypothetical situation...)

ErikAnders wrote Jul 7, 2015 at 10:07 AM

Oh ok this makes sense.

Could you improve the Documentation at this Part ?

At the Point Usage the path is cut of in the Picture

after i found the piece of source
if ($NavIde -eq '') 
    $NavIde = $sourceclientfolder+'\finsql.exe'
i thought this is normal to add the finsql.exe later to the variable.

kindly regards Erik

kine wrote Jul 7, 2015 at 10:32 AM

I extended the description of the parameter in the documentation.

The part of code you mentioned is some non-sense, I will check that. The $sourceclientfolder parameter does not exists in the functions anymore. Looks like some left-over.