
#get some clean real state and tells the user what is being compiled (just the file name, no path). & "C:\Program Files\MetaTrader 5\metaeditor64.exe" /compile:"$FileToCompile" /log:"$LogFile" /inc:"C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5" | Out-Null Get-Process -Name terminal64 -ErrorAction Silentl圜ontinue | otherwise it will not see the new compiled version of the code. #first of all, kill MT Terminal (if running). Write-Host $FileToCompile -ForegroundColor Red Write-Host "ERROR! Impossible to Compile! Your Filename or Path contains SPACES!" -ForegroundColor Red #before continue check if the Compile File has any spaces in it. & "C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\compile.bat" "C:\Program Files\MetaTrader 5\metaeditor64.exe" "$FileToCompile" "$LogFile" "C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5"

#cleans the terminal screen and sets the log file name. Param($FileToCompile = "C:\Users\Username\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Experts\Advisors\ExpertMACD.mq5") This is the PowerShell script (which works with F8): #gets the File To Compile as an external parameter. (before I chose PowerShell as the default shell as described in the linked description).

The terminal process terminated with exit code: 1 My question refers to the compiling process, which consists of a VSC-task that calls a PowerShell script which invokes MetaEditor.exe to perform the actual compiling.Įverything works fine when I run the PowerShell script directly (by selecting its code and hitting F8), but when I try to run it via the designated VSC-task I get the error
#VISUAL STUDIO COMMUNITY FOR MAC EXIT TERMINAL HOW TO#
I want to use the Visual Studio Code IDE ("VSC") to develop in MQL (rather than in the native MetaEditor IDE) as described here: How to code & compile MQL5 in Visual Studio.
