How to use with Visual Studio 2010?

Ask general questions here.
User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

How to use with Visual Studio 2010?

Post by Aracknid » Tue Aug 10, 2010 3:35 pm

Hello,

I'm new to both Ranorex and VS 2010. I'm currently evaluating the 30 day trial. I've had success with the Ranorex Studio, but now I'm trying to see how integration works with VS2010.

On the system I'm using, first I installed Ranorex 30 day trial (version 2.3.3.8879). Then after using it for a few weeks, I installed VS 2010.

I'm trying to follow the example posted here (http://www.ranorex.com/support/user-gui ... ation.html), even though it says it is for VS 2005 and VS 2008. I assume it should still work.

My first issue is that when I go to add a reference to Ranorex Core. None of the Ranorex items are listed under the .NET tab. I assume this is because of the order in which I installed the products. I went to browse tab and added a reference to the file Ranorex.Core.DLL in the Ranorex BIN folder. Was this correct? Do I need to do anything else?

My second issue (might be related to the first) is when I put the code into the application (as per above link) and try to build the program, I get many errors related to the fact that it doesn't know what the Ranorex item is. I also get some warnings as such:

"The referenced assembly "Ranorex.Core, Version=2.3.3.8879, Culture=neutral, PublicKeyToken=b798506b574ebc9a, processorArchitecture=MSIL" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project."

Can someone please point me in the right direction?

Thanks,

Aracknid

QAWebTester
Posts: 3
Joined: Wed Aug 11, 2010 7:38 am

Re: How to use with Visual Studio 2010?

Post by QAWebTester » Wed Aug 11, 2010 9:27 am

Hi Aracknid,
What is your target .NET framework?
I followed the steps in the below link:
http://www.ranorex.com/support/user-gui ... ation.html
with target .NET framework as 3.0.
I created a C# Console project with 3.0 framework as target.
I could see Ranorex.Core Library and System.Drawing library to reference.
Copy pasted the calculator code in the above link.
I was able to compile and run the test script without issues.

But I had to remove references for few libraries not supported by 3.0 to compile like System.XML.Linq etc...

Hope this helps.

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

Re: How to use with Visual Studio 2010?

Post by Support Team » Wed Aug 11, 2010 10:26 am

Hi,

Ranorex uses DLLs that are not included in the .NET Framework 4 Client Profile, consequently you can't compile to that framework. Please, change that "Target Framework" in your Build settings to ".NET Framework 4" or ".NET Framework 3.5".

In a future release of Ranorex, Visual Studio 2010 will be supported out of the box. This means you can use the GAC as you know it in Visual Studio 2008/2005. Meanwhile, please take a look to following post http://www.ranorex.com/forum/post5453.html and execute the steps in it.

Regards,
Peter
Ranorex Team
.
Image

User avatar
Aracknid
Posts: 342
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

Re: How to use with Visual Studio 2010?

Post by Aracknid » Wed Aug 11, 2010 7:59 pm

OK thanks. I was able to get it to work by changing it to use the .NET 3.5 framework.

Aracknid