Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xUnit.net + dotCover meta-runner] Error "Incorrect 'TargetExecutable' value" #123

Open
stasones opened this issue Jul 27, 2018 · 0 comments

Comments

@stasones
Copy link

TeamCity Professional 2018.1 (build 58245)
The error in "Step 1/1: Install Test runner, Create config, Run tests, Update coverage (PowerShell)":
[Step 1/1] Incorrect 'TargetExecutable' value 'C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net452\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net46\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net461\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net462\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net47\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net471\xunit.console.exe C:\TeamCity\buildAgent\work\6fc5b5e66f19d062\xunit.runner.console.2.4.0\tools\net472\xunit.console.exe'

The problem is in the following code:

$xunit = Join-Path $workingDir "xunit.runner.console.*\tools\$xUnitExe" | Resolve-Path
    
if (-not $xunit) {
    # Try finding xunit under framework specific folder
     $xunit = Join-Path $workingDir "xunit.runner.console.*\tools\net4*\$xUnitExe" | Resolve-Path
}

When $xUnitExe is "xunit.console.exe" (as specified in readme.md) then Join-Path command will return multiple results for the "xunit.runner.console.\tools\net4\$xUnitExe" path.

As a fast solution can be specified the folder name for "Xunit Runner Executable" param:
"net461\xunit.console.exe".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant