machine/machine.specifications — Issue #78: R# runner integration fails with R# 6.1
Author: MarisicDotNet
Created: 2011-11-14 18:00:21+00:00
State: open

I saw that the runner doesn't work with R# 6.1.

I tried to fork and fix this myself, but I didn't achieve success. I downloaded the new SDK binaries, copied the 6.0 project, renamed 6.0 to 6.1 where relevant and used the new SDK binaries.

This lead to build failures on code regions similar to:

#if RESHARPER_6
var id = BehaviorElement.CreateId(context, fieldName);

var behavior = provider.UnitTestManager.GetElementById(project, id) as BehaviorElement;
if (behavior != null)
{
behavior.Parent = context;
behavior.State = UnitTestElementState.Valid;
return behavior;
}
#endif

Apparently GetElementById, no longer exists.

I attempted to replace this usage with

var behavior = provider.UnitTestManager.GetElements(new List { project }).Cast().FirstOrDefault(x => x.Id == id);

Also it seems they've added members to the interface IUnitTestElement.

After replacing 4 or so similar occurrences of the GetElementById, i updated all of the #if RESHARPER_6 to #if RESHARPER_6 || #if RESHARPER_6_1.

Was able to get the project to build, tried installing the binaries to R# and it just blows up with tons of errors.