How to update C# version in Ranorex Studio?

Ask general questions here.
Sallie48
Posts: 1
Joined: Mon May 06, 2019 5:45 am

How to update C# version in Ranorex Studio?

Post by Sallie48 » Thu May 09, 2019 5:00 am

My project in Ranorex Studio (v8.3.1) is using .NET Framework 4.5.2 and C# 5.0. I want to leverage the features of newer C# versions e.g. String Interpolation. So I want to upgrade my Ranorex Project to at least C# 6.0.

The problem is that when I go to Tools > Project Upgrade, I only see that .NET 4.6 and C# 5.0 are available in the dropdown for the upgrade.

What do I have to do get the latest/newer version of C# in Ranorex Studio so that I can upgrade my project within the Ranorex?

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

Re: How to update C# version in Ranorex Studio?

Post by Support Team » Thu May 09, 2019 8:14 pm

Hello Sallie48,

With the release of Ranorex 9.0 we now support Compiling C# 7.0! - https://www.ranorex.com/release-notes/

If you do not see C# 7.0 as an option please make sure to upgrade to the latest version of Ranorex. I also recommend installing the latest Microsoft Build tools - https://visualstudio.microsoft.com/down ... tudio-2017

Regards,
Sean
.
Image

dhale
Posts: 36
Joined: Thu Feb 27, 2014 7:33 pm

Re: How to update C# version in Ranorex Studio?

Post by dhale » Fri May 10, 2019 8:34 pm

If you are not on 9, If I remember correctly, another way is to manually edit the csproj file
For example, we have <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> in ours...