Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/batch-file/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何使用MSBuild+使用Selenium WebDriver运行NUnit测试;巴斯?_C#_Batch File_Selenium_Msbuild_Nunit - Fatal编程技术网

C# 如何使用MSBuild+使用Selenium WebDriver运行NUnit测试;巴斯?

C# 如何使用MSBuild+使用Selenium WebDriver运行NUnit测试;巴斯?,c#,batch-file,selenium,msbuild,nunit,C#,Batch File,Selenium,Msbuild,Nunit,在我的VS中,我使用SeleniumWebDriver进行了一些简单的NUnit测试。如何使用MSBuild+批处理在控制台中运行测试?我创建.bat文件,如下所示: set pathMSBuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\" @echo off cls cd %pathMSBuild% msbuild.exe "C:\Users\IliA\Documents\Visual Studio 2015\Projects\G

在我的VS中,我使用SeleniumWebDriver进行了一些简单的NUnit测试。如何使用MSBuild+批处理在控制台中运行测试?我创建.bat文件,如下所示:

set pathMSBuild = "C:\Windows\Microsoft.NET\Framework64\v4.0.30319\"
@echo off
cls
cd %pathMSBuild%
msbuild.exe "C:\Users\IliA\Documents\Visual Studio 2015\Projects\GitHubAutomation\GitHubAutomation.sln" /p:configuration=debug
pause
但当我尝试运行build.bat时,出现了一个错误:“msbuild”未被识别为内部或外部命令、可操作程序或批处理文件


My build.bat位于C:\

要在命令提示符下启用msbuild,请将.Net(版本)框架位置添加到PATH环境变量。

通过右键单击“计算机”,选择“属性”,单击左侧导航上的“高级系统设置”,可以访问环境变量。在对话框中,单击“环境变量”按钮,并使用.Net framework路径更新“路径”,例如C:\Windows\Microsoft.Net\framework\v4.0.30319

将bat文件更新为CD到.Net framework目录中,其中有msbuild.exe可用,然后发出
msbuild
命令,如下所示:

CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319
msbuild <<YOUR PROJECT PATH>>
PAUSE
EXIT
CD C:\Windows\Microsoft.NET\Framework64\v4.0.30319
msbuild
暂停
出口