Unit testing 由于以下错误而失败:尝试从teamcity中的文本文件读取数据时发生800704a6

Unit testing 由于以下错误而失败:尝试从teamcity中的文本文件读取数据时发生800704a6,unit-testing,nunit,teamcity,watin,Unit Testing,Nunit,Teamcity,Watin,我正在使用teamcity运行一些测试用例。它成功地将数据保存在文本文件中,但当我尝试从同一位置读取该数据时,它给出了以下错误 安装方法失败。System.Runtime.InteropServices.COMException: 使用CLSID创建COM组件的实例 来自IClassFactory的{0002DF01-0000-0000-C000-0000000000 46}失败 由于以下错误:800704a6。在 WatiN.Core.IE.CreateNewIEAndGoToUri(Uri,

我正在使用teamcity运行一些测试用例。它成功地将数据保存在文本文件中,但当我尝试从同一位置读取该数据时,它给出了以下错误

安装方法失败。System.Runtime.InteropServices.COMException: 使用CLSID创建COM组件的实例 来自IClassFactory的{0002DF01-0000-0000-C000-0000000000 46}失败 由于以下错误:800704a6。在 WatiN.Core.IE.CreateNewIEAndGoToUri(Uri,LogonDialogHandler logonDialogHandler,布尔值createInNewProcess)位于 WatiN.Core.IE..ctor()

并将保存的数据替换为
System.String[]
。还尝试向用户提供所有权限,但仍然无法修复。请帮忙

我还启用了大多数IE8设置。你知道这是什么原因吗

以下是构建日志

[11:50:09]: NUnit report watcher
[11:50:09]: [NUnit report watcher] Watching paths: <no paths>
[11:50:09]: Project "Tests.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build;TeamCity_Generated_NUnitTests target(s)): (2m:10s)
[11:50:13]: Tests.dll (2m:06s)
[11:52:19]: [Tests.dll] Tests.bTests
[11:52:19]: [Tests.bTests] SetUp method failed. System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.
[11:52:19]: [Tests.bTests] SetUp method failed. System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.
       at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess)
       at WatiN.Core.IE..ctor()
       at Tests.bTests.Setup() in Z:\TestProjects\Tests\Tests\bTests.vb:line 14
[11:52:20]: Some tests has failed in Z:\TestProjects\Tests\Tests\bin\Release\Tests.dll, tests run continued. Child test failed
[11:52:20]: 1 Test(s) failed.
[11:52:20]: [Project "Tests.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build;TeamCity_Generated_NUnitTests target(s)):] Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17, 5): c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\BuildAgent\temp\buildTmp\tmp6D24.tmp exited with code 1.
[11:52:20]: MSBuild output:
[11:52:20]: CoreResGen:
[11:52:20]:   All outputs are up-to-date.
[11:52:20]: CoreCompile:
[11:52:20]:   c:\Windows\Microsoft.NET\Framework\v4.0.30319\Vbc.exe /noconfig /imports:Microsoft.VisualBasic,System,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics /optionstrict:custom /nowarn:42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 /nostdlib /rootnamespace:Tests /sdkpath:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0" /doc:obj\Release\Tests.xml /define:"CONFIG=\"Release\",TRACE=-1,_MyType=\"Windows\",PLATFORM=\"AnyCPU\"" /reference:"C:\Program Files (x86)\NUnit 2.4.8\bin\nunit.framework.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Core.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll","C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll","C:\Program Files (x86)\WatiN\bin\WatiN.Core.dll" /debug:pdbonly /optimize+ /out:obj\Release\Tests.dll /resource:obj\Release\Tests.Resources.resources /target:library aTests.vb bTests.vb cAmendmentTests.vb Functions.vb dCancelRefundTests.vb "My Project\AssemblyInfo.vb" "My Project\Application.Designer.vb" "My Project\Resources.Designer.vb" "My Project\Settings.Designer.vb" "C:\BuildAgent\temp\buildTmp\.NETFramework,Version=v4.0.AssemblyAttributes.vb"
[11:52:20]: _CopyAppConfigFile:
[11:52:20]: Skipping target "_CopyAppConfigFile" because all output files are up-to-date with respect to the input files.
[11:52:20]: CopyFilesToOutputDirectory:
[11:52:20]:   Copying file from "obj\Release\Tests.dll" to "bin\Release\Tests.dll".
[11:52:20]:   Tests -> Z:\TestProjects\Tests\Tests\bin\Release\Tests.dll
[11:52:20]:   Copying file from "obj\Release\Tests.pdb" to "bin\Release\Tests.pdb".
[11:52:20]:   Copying file from "obj\Release\Tests.xml" to "bin\Release\Tests.xml".
[11:52:20]: Done Building Project "Z:\TestProjects\Tests\Tests\Tests.vbproj" (default targets).
[11:52:20]: Done Building Project "Z:\TestProjects\Tests\Tests.sln" (default targets).
[11:52:20]: TeamCity_Generated_NUnitTests:
[11:52:20]:   c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\BuildAgent\temp\buildTmp\tmp6D24.tmp
[11:52:20]: Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17,5): error : c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\BuildAgent\temp\buildTmp\tmp6D24.tmp exited with code 1.
[11:52:20]: Done Building Project "Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build;TeamCity_Generated_NUnitTests target(s)) -- FAILED.
[11:52:20]: Build FAILED.
[11:52:20]: "Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx" (TeamCity_Generated_Build;TeamCity_Generated_NUnitTests target) (1) ->
[11:52:20]: (TeamCity_Generated_NUnitTests target) -> 
[11:52:20]:   Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17,5): error : c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe "@@" C:\BuildAgent\temp\buildTmp\tmp6D24.tmp exited with code 1.
[11:52:20]:     0 Warning(s)
[11:52:20]:     1 Error(s)
[11:52:20]: Time Elapsed 00:02:10.92
[11:52:20]: Build finished
[11:50:09]:NUnit报告观察者
[11:50:09]:[NUnit report watcher]监视路径:
[11:50:09]:项目“Tests.sln.teamcity.patch.tcprojx”(teamcity生成的构建;teamcity生成的测试目标):(2m:10s)
[11:50:13]:Tests.dll(2m:06s)
[11:52:19]:[Tests.dll]Tests.bTests
[11:52:19]:[Tests.bTests]安装方法失败。System.Runtime.InteropServices.COMException:由于以下错误,使用IClassFactory中的CLSID{0002DF01-0000-0000-C000-0000000000 46}创建COM组件的实例失败:800704a6。
[11:52:19]:[Tests.bTests]安装方法失败。System.Runtime.InteropServices.COMException:由于以下错误,使用IClassFactory中的CLSID{0002DF01-0000-0000-C000-0000000000 46}创建COM组件的实例失败:800704a6。
在WatiN.Core.IE.CreateNewIEAndGoToUri(Uri Uri、LogonDialogHandler、LogonDialogHandler、Boolean createInNewProcess)
在WatiN.Core.IE..ctor()
在Z:\TestProjects\Tests\Tests\bTests.vb中的Tests.bTests.Setup()处:第14行
[11:52:20]:Z:\TestProjects\tests\tests\bin\Release\tests.dll中的某些测试失败,测试运行继续。儿童测试失败
[11:52:20]:1项测试失败。
[11:52:20]:[Project“Tests.sln.teamcity.patch.tcprojx”(teamcity_-Generated_-Build;teamcity_-Generated_-NUnitTests目标):]Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17,5):c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe@“c:\BuildAgent\temp\buildTmp\tmp6D24.tmp退出,代码为1。
[11:52:20]:MSBuild输出:
[11:52:20]:CoreResGen:
[11:52:20]:所有输出都是最新的。
[11:52:20]:核心编译:
[11:52:20]:c:\Windows\Microsoft.NET\Framework\v4.0.30319\Vbc.exe/noconfig/imports:Microsoft.VisualBasic,System,System.Collections,System.Collections,System.Collections,System.Collections.Generic,System.Data,System.Diagnostics/optionstract:custom/nowarn:420164199942017420184201942032420364202142022/nostlib/rootnamespace:Tests/sdkpath:“c:\Program Files(x86)\引用Assemblies\Microsoft\Framework\.NETFramework\v4.0”/doc:obj\Release\Tests.xml/define:“CONFIG=\“Release\”,TRACE=-1,\u MyType=\“Windows\”,PLATFORM=“AnyCPU\”/Reference:“C:\Program Files(x86)\NUnit 2.4.8\bin\NUnit.Framework.dll”,“C:\Program Files(x86)\Reference assemblems\Microsoft\Framework\.NETFramework\.NETFramework\v4.0\System.Core.dll,“C:\Program Files(x86)\Reference Assembly\Microsoft\Framework\.NETFramework\v4.0\System.Data.dll”、“C:\Program Files(x86)\Reference Assembly\Microsoft\Framework\.NETFramework\v4.0\System.dll”、“C:\Program Files(x86)\Reference Assembly\Microsoft\Framework\.NETFramework\v4.0\System.Xml.dll”、“C:\Program Files(x86)\WatiN\bin\WatiN.Core.dll”“/debug:pdbonly/optimize+/out:obj\Release\Tests.dll/resource:obj\Release\Tests.Resources.Resources/target:library-aTests.vb bTests.vb cAmendmentTests.vb Functions.vb dCancelRefundTests.vb”我的项目\AssemblyInfo.vb”“我的项目\Application.Designer.vb”“我的项目\Resources.vb”“我的项目\Settings.Designer.vb”C:\BuildAgent\temp\buildTmp\.NETFramework,版本=v4.0.AssemblyAttributes.vb
[11:52:20]:\u CopyAppConfigFile:
[11:52:20]:跳过目标“\u CopyAppConfigFile”,因为所有输出文件都是输入文件的最新版本。
[11:52:20]:CopyFilesToOutputDirectory:
[11:52:20]:将文件从“obj\Release\Tests.dll”复制到“bin\Release\Tests.dll”。
[11:52:20]:Tests->Z:\TestProjects\Tests\Tests\bin\Release\Tests.dll
[11:52:20]:将文件从“obj\Release\Tests.pdb”复制到“bin\Release\Tests.pdb”。
[11:52:20]:正在将文件从“obj\Release\Tests.xml”复制到“bin\Release\Tests.xml”。
[11:52:20]:已完成构建项目“Z:\TestProjects\Tests\Tests\Tests.vbproj”(默认目标)。
[11:52:20]:已完成构建项目“Z:\TestProjects\Tests\Tests.sln”(默认目标)。
[11:52:20]:TeamCity生成的测试:
[11:52:20]:c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe“@@”c:\BuildAgent\temp\buildTmp\tmp6D24.tmp
[11:52:20]:Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17,5):错误:c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe“@”c:\BuildAgent\temp\buildTmp\tmp6D24.tmp已退出,代码为1。
[11:52:20]:已完成生成项目“Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx”(teamcity\u生成的\u构建;teamcity\u生成的\u NUnitTests目标)——失败。
[11:52:20]:生成失败。
[11:52:20]:“Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx”(teamcity生成的\u构建;teamcity生成的\u NUnitTests目标)(1)->
[11:52:20]:(TeamCity生成的NUnitTests目标)->
[11:52:20]:Z:\TestProjects\Tests\Tests.sln.teamcity.patch.tcprojx(17,5):错误:c:\BuildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe“@”c:\BuildAgent\temp\buildTmp\tmp6D24.tmp已退出,代码为1。
[11:52:20]:0个警告
[11:52:20]:1个错误
[11:52:20]:经过的时间00:02:10.92
[11:52:20]:构建完成

与相关

与相关

不确定此问题是否已解决,但我有相同的错误
public static void CloseInternetExplorers()
{
  var processes = from process in Process.GetProcesses()
                  where process.ProcessName == "iexplore"
                  select process;

  foreach (var process in processes)
  {
    while (!process.HasExited)
    {
      process.Kill();
      process.WaitForExit();
    }
  }
}