Page 1 of 1

Any using Visual Studio 2015 / Any Issues?

Posted: Tue Nov 03, 2015 11:12 pm
by carsonw
Soon we'll be upgrading to Visual Studio 2015 / ReSharper 10. Has anyone been using Ranorex with Visual Studio 2015? We're using 2013 right now without any issues.

Has anyone run into any problems? Thanks!

Carson.

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Wed Mar 02, 2016 6:56 pm
by carsonw
It looks like Ranorex doesn't understand null propagation, which Visual Studio 2015 does:

This is ok:

if (Command.Connection != null)
{
Command.Connection.Close();
}

But this is not:

Command.Connection?.Close();

I'm not sure if there are other "gotchas" lurking about, but there's one at least...

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Fri Mar 04, 2016 4:27 pm
by Support Team
Hello Carson,

I'm not exactly sure, if I understand the problem correctly.
I opened a Ranorex Studio project in Visual Studio 2015, selected the .NET Framework version 4.6.1 and the propagation works as expected.
To be honest, it doesn't look like a Ranorex issue since you are using Visual Studio.
Please let me know if I understand something wrong.

Regards,
Bernhard

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Sat Mar 05, 2016 1:28 am
by carsonw
Hi there - basically I can build the solution in Visual Studio 2015 just fine, but if I build it in Ranorex it errors out on the line of code. If I change it to the code I mentions, it builds correctly

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Sat Mar 05, 2016 2:07 am
by carsonw
Here's another one:

Visual Studio 2015:

using static System.String;

Builds... in Ranorex it fails

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Mon Mar 07, 2016 2:40 pm
by krstcs
OK, so the issue is that Ranorex STUDIO doesn't support null propagation, not that Ranorex in Visual Studio doesn't support it?

This is probably because Ranorex Studio is built on Sharp Develop 3.2, which does not support some syntax from newer versions of .NET. It may still compile just fine for some things, but you won't have code completion and syntax highlighting for newer constructs.

Are you sure you have set the Ranorex Studio projects to use .NET 4.5? I think 4.5 is the highest that Ranorex Studio supports. Although, I don't thing 4.5 supports null propagation, I think that is only in .NET 4.6, so that may be your issue. Same thing with the static using directive.

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Mon Mar 07, 2016 2:56 pm
by odklizec
The good thing is that the Ranorex Studio is going to be updated (hopefully) soon with much more recent SharpDevelop 4.x. This should bring us also enhanced compatibility with more recent .Net versions. It seems the next major Ranorex version is right behind the door?...
http://www.ranorex.com/company/product-roadmap.html

Re: Any using Visual Studio 2015 / Any Issues?

Posted: Thu Mar 10, 2016 1:47 pm
by Support Team
Hello everybody,

It's correct that we are currently working on a new version, but the issue is more related to the version of MSBuild.
In order to allow null propagation you would need MSBuid 14.0.
In general it is possible to use a higher version of MSBuild already with the current of Ranorex.
However, I don't really want to post this workaround into our forum because this is not really supported.
Please send an email to [email protected] in order to get more information.

Regards,
Bernhard