Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

OTTER 1.5.0 - Error msg after upgrade in configuraiton Script (PSEnsure)



  • Hello

    I just upgrade the server to 1.5.0 and I have the following error msg for a configuraiton script based on PSEnsure:

    ERROR: Unhandled exception: System.InvalidCastException: Impossible d'effectuer un cast d'un objet de type 'SZArrayEnumerator' en type 'System.Collections.Generic.IEnumerator1[System.Collections.Generic.KeyValuePair2[System.String,Inedo.ExecutionEngine.RuntimeValue]]'. à Inedo.ExecutionEngine.RuntimeMapValue.GetEnumerator() à Inedo.Extensions.Windows.PowerShell.PSUtil.<ExecuteScriptAsync>d__0.MoveNext()

    The variables seems not to be correctly set and pass to the script

    Regards



  • Script with the error :

    set $DossierSource = ${DossierRoot}\${EnvDossier}\${DossierBin};
    set $DossierDest = ${DossierSrv}\${DossierBin};
    Ensure-Directory $DossierDest
     (
         Exists: true
     );
     # Try/Catch
     try
     {
         PSEnsure
         (
             Key: SynchroDossierBin,
             Value: 0,
             CollectScript: FolderCompare,
             ConfigureScript: FolderSync,
             UseExitCode: true,
             Debug: true,
             Verbose: true,
             CollectScriptParams: %(DossierSource:$DossierSource,DossierDestination:$DossierDest),
             ConfigureScriptParams: %(DossierSource:$DossierSource,DossierDestination:$DossierDest)
         );
     }
     catch
     {
         Log-Error Synchro C:\DSI\BIN;
     }
    

    }

    Hope this will be helpfull

    Regards



  • I am experiencing the same issue after upgrading from v1.4.6 to v1.5.1. I have not yet discovered a way around this.



  • Pb solved with the 1.5.2


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation