locked
Mstest - does not load the test dll if UNC path is referenced in the testcontainer RRS feed

  • Question

  • When I ran a automated test from the MS Test Manager, it failed with the below message.

    "Error adding test case [123] to test run: Could not load file or assembly 'file://\localhost\TFS\OGUI\OGUI_20111228.8\catsprojects.dll' or one of its dependencies. The system cannot find the file specified."

    Also when I ran the recorded test using MsTest with local reference, the dll loaded and the playback was done.and the test ran successfuly.

    eg.  mstest /testcontainer:D:\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll

    But with UNC Path, the dll was not loaded and it showed the below error.

    mstest /testcontainer:"\200411dc0310\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll"

    Could not load file or assembly 'file://\200411dc0310\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)

    How do we fix this and run the tests referencing the UNC path?  

    Any help is greatly appreciated.

    Thanks

    Mush

    Wednesday, January 4, 2012 9:16 AM

Answers

All replies

  • Hi
    When I ran a automated test from the MS Test Manager, it failed with the below message.
    "Error adding test case [123] to test run: Could not load file or assembly 'file://\localhost\TFS\OGUI\OGUI_20111228.8\catsprojects.dll' or one of its dependencies. The system cannot find the file specified."
    Also when I ran the recorded test using MsTest it failed 
    mstest /testcontainer:\200411dc0310\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll
    Could not load file or assembly 'file://\200411dc0310\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
    MSTest loaded the dll and played back only if the dll location is referenced with the "local path" instead of "shared path."  
    mstest /testcontainer:D:\TFS\OGUI\OGUI_20111228.8\CATSProjects.dll
    But with UNC Path, the dll was not loaded and it showed the above error. 
    How do we fix this in both MTM and MStest? Please help.
    Thanks
    Mush
    Wednesday, January 4, 2012 1:22 PM
  • Hi, you could use the xcopy command to copy the files before running the tests http://www.computerhope.com/xcopyhlp.htm

    Thanks,

    Anuj


    http://www.anujchaudhary.com
    Thursday, January 5, 2012 3:33 AM
  • That will work with MSTest but how to fix in MTM where we associate the test plan with a Build (output of which is stored in UNC Path).

    Whether MStest supports dll referenced in a share folder ?


    Mush
    Thursday, January 5, 2012 9:22 AM
  • Hi, for the MTM scenario, the test agent copies the files locally from the build drop into %localappdata%\VSEQTand it works well.

    Thanks,

    Anuj


    http://www.anujchaudhary.com
    Thursday, January 5, 2012 4:31 PM
  • Hi Mush,


    I am moving your thread into the Testing with Visual Studio Test Manager (MTM) Forum for dedicated support. Thanks for your understanding.

    Have a nice day,


    Jack Zhai [MSFT]
    MSDN Community Support | Feedback to us
    Friday, January 6, 2012 6:17 AM
  • Hi,

    UNC path wont work. You can copy the dll locally using xcopy command and then run the tests using mstest command.

    Thanks,

    Anuj


    http://www.anujchaudhary.com
    Tuesday, January 10, 2012 2:18 AM
  • Thursday, October 30, 2014 8:08 PM