VS 2010 Problems

Bug reports.
Marianne Jacobsen
Posts: 44
Joined: Fri Oct 26, 2007 1:18 pm

VS 2010 Problems

Post by Marianne Jacobsen » Thu Nov 04, 2010 8:29 am

I simply cannot get Ranorex to work with Visual Studio 2010. I've changed my app.config as posted here: http://www.ranorex.com/forum/post5453.html

The code compiles and executes but no controls are ever found (using findsingle or tryfindsingle) - even if I copy paste the RanoreXpath from the spy directly into the code. The spy can highlight the same control without any problems.
The AUT is compiled in VS 2010 (with target as .NET 4.0) - and can be automated just fine with automation code compiled in VS 2008.

Even if I change the target framework to 3.5 or 3.0 it still does not find any controls - it returns null.

So to clarify:

Automation code with target 3.5 from VS 2008 -> No problems automating a VS2010 (.NET 4.0) AUT
Automation code with target 3.5 or from VS 2010 -> Cannot automate a VS2010 (.NET 4.0) AUT (can compile but no controls are found).

Any hints as to what could be wrong?

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: VS 2010 Problems

Post by artur_gadomski » Thu Nov 04, 2010 8:44 am

What processor architecture are you compiling to?
I have a repository made with 32 bit Spy and when I try to use it in automation compiled to x64 architecture it doesn't seem to find some controls. It works great if compiled for x86 though.

Marianne Jacobsen
Posts: 44
Joined: Fri Oct 26, 2007 1:18 pm

Re: VS 2010 Problems

Post by Marianne Jacobsen » Thu Nov 04, 2010 9:04 am

Ah I've changed all projects to x86 and target framework 3.5 and now it works again. I think I'll wait for an official announcement on .NET 4.0 support before migrating my projects again.

Marianne Jacobsen
Posts: 44
Joined: Fri Oct 26, 2007 1:18 pm

Re: VS 2010 Problems

Post by Marianne Jacobsen » Thu Nov 04, 2010 9:05 am

And please note that now if I change target to .NET 4.0 and change the app.config file (and make sure all projects are marked with x86) I still cannot automate anything.

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

Re: VS 2010 Problems

Post by Support Team » Thu Nov 04, 2010 10:09 am

Hi,

Please can you post us the exception message you get?
I'm sure you get one.
Also could you post us the appconfig.xml file, so we can take a look on it. We tried to reproduce it and it was working as expected.

Thanks in advance.

Regards,
Peter
Ranorex Team
.
Image

Marianne Jacobsen
Posts: 44
Joined: Fri Oct 26, 2007 1:18 pm

Re: VS 2010 Problems

Post by Marianne Jacobsen » Thu Nov 04, 2010 10:34 am

There are no messages - except for the exception thrown when FindSingle finds no control.

Run WindowsApplication - and then run ConsoleApplication to try to find the button on it.
Set target on Console to 3.5 and try again.

Forms target is 3.5 - created in VS2010
Console target is 4.0 - created in VS2010
Attachments
ConsoleApplication1.zip
(47.18 KiB) Downloaded 201 times
WindowsFormsApplication2.zip
(44.12 KiB) Downloaded 202 times

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

Re: VS 2010 Problems

Post by Support Team » Thu Nov 04, 2010 1:08 pm

Hi,

we are sorry, but in current version of Ranorex it's not possible to resolve some controlls with .Ner Framework 4.0.
You have to set target to 3.5.
This issue will be fixed in next release of our Software.
Thanks for your bug report.

Kind regards,
Tobias
Support Team

Marianne Jacobsen
Posts: 44
Joined: Fri Oct 26, 2007 1:18 pm

Re: VS 2010 Problems

Post by Marianne Jacobsen » Thu Nov 04, 2010 2:42 pm

Thank you.