简体   繁体   中英

Invalid volume separator char ':' (0x3A) in path at index 2

I am writing dotCover Script in PowerShell to generate coverage report.

$testRunner="C:\Program Files (x86)\NUnit 2.6.2\bin\nunit-console.exe"
$dotcover="D:\JetBrains.dotCover.CommandLineTools.2019.3.4\dotcover.exe"
$testContainers="D:\path\to\test.dll"

foreach($test in $testContainers)
{
   $testAssembly = Get-Item $test
   $namespace = $testAssembly.BaseName -replace ".tests", ""
   $testName = $testAssembly.Name
   $testDirectory = (Split-Path $test -Parent)
   $testReport ="D:\temp\$testName.trx" 
   &$dotcover cover /TargetExecutable =$testRunner /Filters ="-:$namespace.Tests;+:class=$namespace" /TargetArguments =$test /resultsFile="$testReport" /Output ="D:\temp\$testName.dcvr" /LogFile ="D:\DotCover.log.txt"
}

It is giving following error:

JetBrains dotCover Console Runner 2019.3.4. Build 777.0.20200227.100227
Copyright (c) 2009-2020 JetBrains s.r.o. All rights reserved.
Parameter 'XmlConfigurationFile' has invalid value.
Invalid volume separator char ':' (0x3A) in path at index 2.
Type 'dotCover help' for usage.

How to resolve this command is as per standards only what am I missing?

I found the mistake this line>>> "-:$namespace.Tests;+:class=$namespace" should be written as>> "-:$namespace.Tests;-:class=$namespace"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM