VS2010 pro not able to start Moles host. RRS feed

  • Question

  • We are using Moles framework (0.94.5) to write unit test cases but not able to either debug or run the test cases. 

    System: Win7 64bit

    Moles: 0.94.5 64bit with VS 2010 pro

    The solution build successfully. But while trying to run test cases we are getting the following error. 

    Error 9/6/2013 3:35:32 PM System.InvalidOperationException: Could not start Moles host. Please review the Test Run Errors for more information.
       at Microsoft.Moles.VsHost.Agent.HostTestAdapterDriver.EnsureHostAdapter()
       at 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) U0319VM2184

    We also followed the fuslogvw to identify if there is any error during assembly loading. It gave two errors for Moles saying

    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=, Culture=neutral, PublicKeyToken=31bf3856ad364e35
    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=, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
    LOG: Start binding of native image Microsoft.Moles, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35.
    WRN: No matching native image found.

    We checked the configurations and everything seems ok. On one of the blog it was mentioned to remove the .exe.config file from privateassemblies folder under VS2010 IDE folder. But could not get it working. 

    After following the above the error we got is moles looking for the project dll in a different drive from where project is located. 

    after we uninstalled moles restarted and installed moles restarted the machine but to no avail. 

    Could not find the right category under which to post this. 



    Friday, September 6, 2013 12:07 PM