C# 向powershell传递文件路径时发生gitlab ci yml错误
试图通过gitlab ci yml中的powershell调用C# 向powershell传递文件路径时发生gitlab ci yml错误,c#,powershell,yaml,mstest,gitlab-ci,C#,Powershell,Yaml,Mstest,Gitlab Ci,试图通过gitlab ci yml中的powershell调用mstest.exe。 当我将路径指定为C:\Program Files(x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exepowershell时,会出现一个错误,提示C:\Program不存在此类cmdlet函数 当我在引号中给出路径时,我得到一个无效的yml错误: This GitLab CI configuration is invalid: (<unknown
mstest.exe
。
当我将路径指定为C:\Program Files(x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe
powershell
时,会出现一个错误,提示C:\Program不存在此类cmdlet函数
当我在引号中给出路径时,我得到一个无效的yml错误:
This GitLab CI configuration is invalid: (<unknown>): found unknown escape character while parsing a quoted scalar at line 26 column 17
我想使用powershell作为shell,在我的runner(即我的windows计算机)中使用gitlab CI执行mstests。您可以使用\“C:\Program Files(x86)\Microsoft Visual Studio 14.0\”
test_job:
stage: test
variables:
MSTestPath: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\mstest.exe"
TestContainer: "/testcontainer: +$ProjectDLL"
TestName: "/test:+$TestName"
TestSettings: "/testsettings: +$TestSettingsPath"
script:
- echo "testing..."
- powershell '&' $MSTestPatch $TestContainer $TestName $TestSettings
only:
- master
tags:
- migration