How do you get Ranorex to default to .net 4?

Ask general questions here.
gannias
Posts: 7
Joined: Tue Apr 30, 2013 5:50 pm

How do you get Ranorex to default to .net 4?

Post by gannias » Tue Aug 13, 2013 7:49 pm

Is there a way to get Ranorex to use .net 4 instead of defaulting to .net 2?

Thanks!

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

Re: How do you get Ranorex to default to .net 4?

Post by odklizec » Tue Aug 13, 2013 9:06 pm

Sure thing. Go to menu Project > Project Options > Compiling tab and here you can select Target Framework.

You can find more details here:
http://www.ranorex.com/support/user-gui ... build.html
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do you get Ranorex to default to .net 4?

Post by krstcs » Wed Aug 14, 2013 2:32 pm

That only works for the CURRENT project.

I believe gannias is asking for a way to may Ranorex default any NEW project to using a certain version of .NET.

Mine currently use 3.5, but I too want to make then all 4.0. Having to go into each project and change it is a pain, especially if your projects are dependent and not in the same solution.


I concur with the feature request: We need a GLOBAL option in Ranorex Studio to set the default .NET target and architecture for new projects.
Shortcuts usually aren't...

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

Re: How do you get Ranorex to default to .net 4?

Post by odklizec » Wed Aug 14, 2013 3:43 pm

I see. As far as I know, not even the actual version of SharpDevelop provide such global "Target Framework" option. And because Ranorex Studio is based of an older version of Sharp Develop, I think the only option would be to edit some Ranorex Studio template files? At least until Sharp Developer folks implement such global option and Ranorex folks update Ranorex Studio with updated Sharp Develop ;)
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do you get Ranorex to default to .net 4?

Post by krstcs » Wed Aug 14, 2013 4:05 pm

Actually, SharpDevelop has a dropdown at the top of the New Project/New Solution dialog that allows you to set the target before creation.

Even this would be better, but you are right, it might just be in the newest version of SD.


And I have looked at every template I can find in the Ranorex directory and can't find any that reference the default target .NET framework. I might just be missing something though.
Shortcuts usually aren't...

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

Re: How do you get Ranorex to default to .net 4?

Post by odklizec » Wed Aug 14, 2013 4:22 pm

I think the required template file is either SharpDevelop.Build.CSharp.targets or SharpDevelop.Override.targets or both? There is used keyword "TargetFrameworkVersion", but I have no clue from where is this keyword filled? Let's hope someone from Ranorex will come with a workaround? ;)
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

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do you get Ranorex to default to .net 4?

Post by krstcs » Wed Aug 14, 2013 8:08 pm

Yeah, I saw those too, but, like you, couldn't figure out what was supposed to go there, and if I did put something there, what the effect would be.
Shortcuts usually aren't...

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

Re: How do you get Ranorex to default to .net 4?

Post by Support Team » Tue Aug 20, 2013 1:45 pm

Hello,

At the moment there is no setting in order to set the Target Framework for all new projects. I will add a feature request in our bug tracking system and we will discuss this feature internally.
As workaround you can change the template file "RanorexTestSuite.xpt" as described below.
You can find the file in the following directory:
"C:\Program Files (x86)\Ranorex 4.1\RanorexStudio\AddIns\AddIns\Misc\RxSharpdevelop\Templates\Projects\CSharp"

Just insert the following line into the "<PropertyGroup>" tag:
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>

For example:
.....
 <Project language = "C#">
        <PropertyGroup>
          <RanorexVersion>4</RanorexVersion>
		  <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
        </PropertyGroup>
        <ProjectItems>
            <Reference Include="System"/>
            <Reference Include="System.Data" />
....
Please make a backup from the file before you change it.

Regards,
Bernhard
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: How do you get Ranorex to default to .net 4?

Post by krstcs » Tue Aug 20, 2013 1:59 pm

Thanks Bernhard!
Shortcuts usually aren't...