Compilation Error while trying run one of the test case using RUN CODE button

Ask general questions here.
asisharavind
Posts: 6
Joined: Tue Aug 31, 2021 5:35 pm

Compilation Error while trying run one of the test case using RUN CODE button

Post by asisharavind » Thu Sep 16, 2021 12:12 am

Hello Everyone,

I'm trying run one of the test case using RUN CODE button but I'm getting an error saying: Compile Error: An assembly with the same identity, Version=4.0.0.0, Culture=neutral, PublickKeyToken=b77**********89' has already been imported. Try removing one of the duplicate references.

Can someone help me with this error. when I run the same test case from the rxtst file/ test suite, it does not give any compilation error. The error is displayed when RUN CODE button is used to run the case.


Thanks!
Asish

Jacob
Certified Professional
Certified Professional
Posts: 120
Joined: Mon Mar 22, 2021 10:01 pm

Re: Compilation Error while trying run one of the test case using RUN CODE button

Post by Jacob » Fri Sep 17, 2021 11:16 pm

Hi asisharavind, and welcome to the forums!

This error usually crops up when there are multiple versions of the same referenced DLL in a project. However, there are different reasons why this could happen. Is there a CS number referenced in the error (for example, CS1703)? This may help us to diagnose the issue further.

--Jacob
Image

asisharavind
Posts: 6
Joined: Tue Aug 31, 2021 5:35 pm

Re: Compilation Error while trying run one of the test case using RUN CODE button

Post by asisharavind » Fri May 13, 2022 6:46 am

Thank you for the response. There is no CS number mentioned in the error description but im still facing the compilation error when clicked on Run Code button from inside the test case.
Error Description says: Compile Error: An assembly with the same identity,'mscorlib, Version=4.0.0.0, Culture=neutral, PublickKeyToken=b77a5c561934e089' has already been imported. Try removing one of the duplicate references.

I tried removing mscorlib from references folder but that didn't help to fix the error. Can someone please provide a solution for this error.

Additional Details:
Ranorex Version: 10.1.6
.Net Version: 4.0.30319.42000