Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file

Vinayak Deva 96 Reputation points
2020-09-30T19:17:45.21+00:00

I am getting the following error "Unit Test Adapter threw exception: Could not load file or assembly 'Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.." when i am trying to run a Coded UI test from from a Test Plan. I am using Visual Studio 2019 16.7.2 version. This was working fine before i updated the latest version of Visual Studio. however, the last time it worked also had a VS 2019 (not sure the exact version).

Thanks in advance for your help!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,198 questions
Visual Studio Testing
Visual Studio Testing
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Testing: The act or process of applying tests as a means of analysis or diagnosis.
351 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vinayak Deva 96 Reputation points
    2020-10-05T17:31:14.44+00:00

    Hello,

    I was able to fix the issue by installing the task "Visual Studio test platform installer" with the same version of Visual Studio i had on machine (16.x.x) before running the test and it did the trick. I was able to deploy the app and run the test through CI/CD.

    Thanks for you help!

    Regards,
    Vinayak

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. olufemia-MSFT 2,861 Reputation points
    2020-09-30T23:50:14.223+00:00
    0 comments No comments

  2. Tianyu Sun-MSFT 31,321 Reputation points Microsoft Vendor
    2020-10-01T04:02:21.44+00:00

    Hello Vinayak,

    Thank you for posting this issue in Microsoft Q&A forum.

    Did you use some related tools, dependencies and extensions such as test agent, test controller, NuGet packages and dll files? If you used some of them, and didn’t change other settings, codes… but only updating VS, then this issue may be more related to the compatibilities of versions of VS(related tools, extensions or others). Please try to update them to the latest version.

    If you changed some related codes, configurations, could you please share some related information with me for further check?

    Besides, please go to your solution folder, rename(or delete) the hidden .vs, bin and obj folders and rebuild your project again to see if the test could run well.

    Sincerely,
    Tianyu

    • If the answer is helpful, please click "Accept Answer" and upvote it.
      Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.