The stuff in `<arg>` may need XML escaping as appropriate, I'm just providing an example below. Consider putting in powershell code in a powershell script and invoking that script instead, since it's much more straight forward to do.
<exec command="dotcover"> <arg>analyze</arg> <arg>/TargetExecutable="c:\Program Files (x86)\NUnit 2.6.4\bin\nunit-console.exe"</arg> <arg>...</arg> </exec> On Sat, Mar 10, 2018 at 5:11 AM Marat <195...@gmail.com> wrote: > I am running code coverage job on windows go agent and trying to pass > dotcover custom command with following arguments: > > analyse > /TargetExecutable="c:\Program Files (x86)\NUnit > 2.6.4\bin\nunit-console.exe" > /TargetArguments="/nologo /noshadow /include=Test /xml=result.xml > src\bin\Test.dll" > /Output=Test.html > /ReportType=HTML > /Filters=-:module=Test > > Gives following error > > [go] Task: dotcover analyse "/TargetExecutable=\"c:\Program Files > (x86)\NUnit 2.6.4\bin\nunit-console.exe\"" "/TargetArguments=\"/nologo > /noshadow /include=Test /xml=result.xml src\bin\Test.dll\"" > /Output=report\Test.html /ReportType=HTML > /AttributeFilters=*.ExcludeFromCodeCoverage /Filters=-:module=Test > took: 0.390s > JetBrains dotCover Console Runner 2017.3.3. Build 111.0.20180302.72821 > Copyright (c) 2009-2018 JetBrains s.r.o. All rights reserved. > Failed to parse xml parameters > Configuration file is not found > Type 'dotCover help' for usage. > > I have tried so many different options to escape those quotes, but still > cannot make it work. > > What can I try to pass it correctly? Any suggestions are appreciated. > > Thank you. > > similar cases: > https://github.com/fsharp/FAKE/issues/1091 > https://github.com/gocd/gocd/issues/2153 > https://github.com/gocd/gocd/issues/4173 > > -- > You received this message because you are subscribed to the Google Groups > "go-cd" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to go-cd+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.