Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Build fails under VS 2015 RTM, seems to be using old files/assemblies?
lassevk
#1 Posted : Wednesday, July 22, 2015 11:13:17 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/14/2011(UTC)
Posts: 9
Location: Porsgrunn, Telemark, Norway

Was thanked: 1 time(s) in 1 post(s)
I have this interface:

public interface IDiffMatchAligner<T>
{
[NotNull]
IEnumerable<DiffElement<T>> Align(Slice<T> slice1, Slice<T> slice2);
}

At some point, the Slice<T> types there were IList<T>, but have subsequently been replaced everywhere.

Build of this class library fails with this error message:

BasicInsertDeleteDiffMatchAligner.cs (7, 57): 'BasicInsertDeleteDiffMatchAligner<T>' does not implement interface member 'IDiffMatchAligner<T>.Align(IList<T>, IList<T>)'

Here is the class definition that it complains about:

public class BasicInsertDeleteDiffMatchAligner<T> : IDiffMatchAligner<T>
{
[NotNull]
public virtual IEnumerable<DiffElement<T>> Align(Slice<T> slice1, Slice<T> slice2) =>
slice1.Select(element => new DiffElement<T>(element, new Option<T>(), DiffOperation.Delete))
.Concat(slice2.Select(element => new DiffElement<T>(new Option<T>(), element, DiffOperation.Insert)));
}

I had this problem once earlier (exact same error, files exactly as above) and fixed it by hitting "Reload and rebuild selected component" on the assembly in the ncrunch tests pane, but now can't seem to shake this problem.
Remco
#2 Posted : Wednesday, July 22, 2015 11:20:37 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for sharing this issue.

There is a massive range of things that can cause an issue like this, so I'm afraid I need to ask quite a few questions to try and narrow this down. I'm not sure if you're able to answer them all, but each one will help:

- Do you receive any build warnings that go with this error?
- Try setting your 'Log Verbosity' global configuration setting to 'Detailed', then rebuild this project. Go to the processing queue, then click on the failed build. Does the build log give you any interesting information about the problem? Look particularly closely at the assemblies being referenced and any warnings given about resolution issues
- Are you able to reproduce the problem in a narrower scope (for example, in a dummy solution?)
- Are the interface declaration and class declaration situated in different projects? If so, what happens if you move them together?
- Do you notice any difference if you run NCrunch under compatibility mode? http://www.ncrunch.net/documentation/troubleshooting_compatibility-mode
- Was there anything specific that seemed to trigger the issue to start appearing consistently? Perhaps a code change or change in your environment? (i.e. upgrade of VS2015)
lassevk
#3 Posted : Wednesday, July 22, 2015 11:27:24 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/14/2011(UTC)
Posts: 9
Location: Porsgrunn, Telemark, Norway

Was thanked: 1 time(s) in 1 post(s)
No build warnings, the project builds and runs all unit tests successfully using ReSharper unit-test runner.

Unfortunately the build issue rectified itself because I managed to change the interface definition by a linefeed to it, this seems to have forced a refresh of the offending file and now everything builds. Good for my progress, but sucks for troubleshooting and figuring out if this is a bug in NCrunch or something else.

Not been able to reproduce it forcibly. I did that earlier but no matter what I did everything worked nicely in that project.

All the classes and interfaces are in one project, all the unit-tests in another. The interface and the class is in the same project.

This has only happened in VS 2015.
Remco
#4 Posted : Wednesday, July 22, 2015 11:54:17 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,144

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I am aware of a problem in which NCrunch can get out of sync with VS document windows under certain circumstances. Making a change to the offending document will always correct the issue immediately. As I've never been able to reproduce the issue consistently enough to understand it, no path to a fix exists. The problem is very rare and always disappears between sessions of NCrunch or VS. It seems to be more common when performing large refactorings (particularly automated ones like those in ReSharper).

My theory is that there is a race condition somewhere in the text buffering of the VS documents and the way that NCrunch retrieves this data. But I have no proof of this. As far as I know, it affects all versions of VS/NCrunch.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.039 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download