question

VinayakDeva-7925 avatar image
0 Votes"
VinayakDeva-7925 asked VinayakDeva-7925 answered

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

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!

vs-generalvs-testing
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VinayakDeva-7925 avatar image
0 Votes"
VinayakDeva-7925 answered TianyuSun-MSFT commented

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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

olufemiaMSFT avatar image
0 Votes"
olufemiaMSFT answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

TianyuSun-MSFT avatar image
0 Votes"
TianyuSun-MSFT answered VinayakDeva-7925 commented

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.


· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi Tianyu,

Thank you for your response. i re-build the project after deleting the folder (.vs, bin, obj) you suggested and re-ran the test from the test plan again, i am still seeing the same error.

I do use Test agent and Test controller to run the test on different server. I am assuming it will automatically deploy when the job is run.I selected VS2019 version from the release pipeline (i am unable to attach a screen in this forum). I did not add any NuGet packages to the project, i just built a basic coded UI project.

Just and FYI..i am able to run the test locally when i run it from VS directly. i am getting this error when i run the same test from the test plan (which used to work before).

Is it a good idea to revert back the VS version to the previous one which was working fine? if so can you please suggest me how to do that?

Thanks for your help!

Regards,
Vinayak


0 Votes 0 ·