Using statement throwing error on build

Ask general questions here.
AshokYamini
Posts: 2
Joined: Tue Sep 25, 2018 12:38 pm

Using statement throwing error on build

Post by AshokYamini » Tue Sep 25, 2018 12:52 pm

I have some .dll which is V4.0 and added as a reference to the project.
and added using statement in my .cs file. when I build it throwing error CS0246.

Can you please help me on this... I am struggling

Thanks in advance

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3932
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Using statement throwing error on build

Post by odklizec » Tue Sep 25, 2018 1:12 pm

Hi,

What dll are we talking about...Ranorex or something 3rd party? I guess with v4.0 you mean .Net 4.0? Ranorex 8.0 and higher requires, at very least, .Net 4.5.2. In other words, make sure the target framework is set to 4.5.2 (or higher).
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

AshokYamini
Posts: 2
Joined: Tue Sep 25, 2018 12:38 pm

Re: Using statement throwing error on build

Post by AshokYamini » Tue Sep 25, 2018 2:04 pm

Hi

Ranorex 8.2.1 +git.3cdaf795
.Net Runtime version: 4.0.303019.42000
and ranorex project I created in .NEt 4.5.2

and external .dll means third party dll

When added thirdparty dll as reference to project added using statement to include library within .cs file

Now when I build the project I am getting the error (CS0246) that is "Could not be found( are you missing using directive or an seembly refernece)"

I think this is a isuue with Ranorex compiler if not please provide solution

Thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Using statement throwing error on build

Post by Support Team » Tue Sep 25, 2018 5:48 pm

Hi AshokYamini,

Since Ranorex uses MSBuild to compile your project, I suspect something else is the issue. To confirm this, please try building your project with MSBuild outside of Ranorex. If the issue persists, then there is an issue with something in your project.

Code: Select all

MSBuild.exe MyRanorexProject.csproj
Issues like this are difficult to debug without having all the files. Are you able to provide a small sample solution (compressed) and this problematic library so we may further analyze the issue?

I hope this helps narrow down the issue and I look forward to your reply!

Kind Regards,
Ned
.
Image