NetSurfer
NetSurfer

Reputation: 123

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?

Upvotes: 0

Views: 307

Answers (1)

NetSurfer
NetSurfer

Reputation: 123

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

Upvotes: 0

Related Questions