Moles フレームワーク (0.94.5) を使用して単体テスト ケースを記述していますが、テスト ケースをデバッグまたは実行することはできません。
システム: Win7 64bit
ほくろ: VS 2010 pro で 0.94.5 64 ビット
ソリューションが正常にビルドされました。しかし、テスト ケースを実行しようとすると、次のエラーが発生します。
{
Error
9/6/2013 3:35:32 PM
System.InvalidOperationException : Could not start Moles host. Please review the Test Run Errors for more information. //error
at Microsoft.Moles.VsHost.Agent.HostTestAdapterDriver.EnsureHostAdapter()
at //error
Microsoft.Moles.VsHost.Agent.HostTestAdapterDriver.Microsoft.VisualStudio.TestTools.Execution.IBaseAdapter.Run(ITestElement testElement, ITestContext testContext)
at Microsoft.Moles.VsHost.Agent.MolesAgentAdapter.Run(ITestElement testElement, ITestContext testContext) //error
U0319VM2184
また、fuslogvw に従って、アセンブリの読み込み中にエラーが発生したかどうかを特定しました。Molesの発言に2つのエラーが発生しました
The operation failed.
Bind result: hr = 0x80070002. The system cannot find the file specified.
Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files\Microsoft Moles\bin\moles.exe
--- A detailed error log follows.
=== Pre-bind state information ===
LOG: User = NORD\x03g
LOG: DisplayName = Microsoft.Moles, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
(Fully-specified)
LOG: Appbase = file:///C:/Program Files/Microsoft Moles/bin/
LOG: Initial PrivatePath = NULL
LOG: Dynamic Base = NULL
LOG: Cache Base = NULL
LOG: AppName = moles.exe
Calling assembly : moles, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
}
===
LOG: Start binding of native image Microsoft.Moles, Version=0.94.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
WRN: No matching native image found.
構成を確認したところ、すべて問題ないようです。ブログの 1 つで、VS2010 IDE フォルダーの下の privateassemblies フォルダーから .exe.config ファイルを削除することが言及されました。しかし、それを機能させることができませんでした。
上記を実行した後、プロジェクトがある場所とは別のドライブでプロジェクト dll を探しているというエラーが表示されました。
モルをアンインストールして再起動した後、モルをインストールしてマシンを再起動しましたが、役に立ちませんでした。
これを投稿する適切なカテゴリが見つかりませんでした。
ありがとう
ヴィッキー