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

Notification

Icon
Error

code markers not showing up in 1.39b
danhaywood
#1 Posted : Thursday, May 17, 2012 8:24:17 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2012(UTC)
Posts: 3
Location: UK

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Have been enjoying using NCrunch (only recently discovered it), in particular the code markers in the editor.

I just upgraded to latest version (1.39b), however, and they have gone.

Turning on logging in the console I saw:


[09:10:41.9504-UI-1] VS reports Document window opened: C:\TestTemplates\Trunk\Code\DELIVERY\business4\Sdm.App\Sdm.Bom4.Customers.UnitTest\PpsnExtensionsTest.cs
[09:10:41.9509-UI-1] ERROR (Internal): System.NullReferenceException: Object reference not set to an instance of an object.
at #=qTCYMNLH7w22rA$jHuCh7r1AOk46X17dW0jHez6$thvnA3my_uR7av$d1da31ERLw.Initialise(VSWindowFrame #=ql1Jqi0_Q3RxwksH_UoEpfA==, Boolean #=q5n8BrvzMNIII7h_ZupWn9qgZ2M1HmnvsmhQ7ygrw6yg=)
at nCrunch.VSAddIn.UI.EditorWindowManager.#=qIcxlkW8nBRz630FycKXdX$jBoMup2Wyi7iAiEOiKPOg=.#=q$YJocBiaX12b3r$dIDAtoRJ88any$q8eZmWW61FIVED3yhoFktZRg3PA6Hecsm8a()
at nCrunch.VSAddIn.UI.EditorWindowManager.#=q$gbPCpdu3mzXxLnraHwRSGMLxbXTct2MLosFAl5vEug=(Action #=qEYz8qI1Rn1o5TgJBt7lO2w==)


which is probably the reason.

I have a number of other plugins installed which the old version was compatible with. I did try rolling back to the previous and that also failed to show code markers, which was strange.

Any thoughts? Shame to have lost those useful markers...

Dan
Remco
#2 Posted : Thursday, May 17, 2012 9:22:47 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,976

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
Hi Dan,

Thanks for posting and I'm glad you've been enjoying NCrunch!

The problem you've described above is caused by Visual Studio failing to provide NCrunch with a pre-registered adornment layer. This is a problem that has been known to affect both NCrunch and other plugins seemingly at random, and as far as I'm aware no one has yet managed to reproduce in the issue in an environment equipped to properly discover its cause.

Essentially something has gone very wrong with your Visual Studio configuration/installation. Most likely the trigger is some combination of the plugins that you have installed, along with VS having some kind of issue while registering NCrunch during installation.

Things to try that may help resolve this problem (in order of desperation):

1. Try uninstalling NCrunch, then running '\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe /setup'. This will force Visual Studio to re-register its list of plugins and may solve whatever went wrong with the adornment registration. Afterwards, try reinstalling NCrunch to see if the problem still exists.

2. Try uninstalling ALL your Visual Studio plugins, then loading Visual Studio, opening a solution, and closing it down again. Then reinstall your plugins one by one (starting with NCrunch), after each install checking to see if the NCrunch markers are showing.

3. Reinstall Visual Studio (a last resort but near certain to solve the issue)


Cheers,

Remco
1 user thanked Remco for this useful post.
danhaywood on 5/17/2012(UTC)
danhaywood
#3 Posted : Thursday, May 17, 2012 9:54:03 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2012(UTC)
Posts: 3
Location: UK

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
Thanks for this... option (1) has yielded partial success.

Well, I think it fully solved that issue, but another issue has arisen... for one of my test classes with multiple tests in it, only the first two tests show the code markers. The processing queue indicates all tests were run, however. I can't see anything awry in the output window.

For example...


[TestMethod]
public void WhenTooShort()
{
"123456T".IsValidAsPpsn().Should().BeFalse();
}

[TestMethod]
public void WhenTooLong()
{
"12345678T".IsValidAsPpsn().Should().BeFalse();
}

[TestMethod]
public void WhenNotDigitsFollowedBySingleCharacter()
{
"A234567T".IsValidAsPpsn().Should().BeFalse();
"12345678".IsValidAsPpsn().Should().BeFalse();
}


The first two methods have black (not green?) markers against them,the last has no marker. In the code being tested, I get green markers for the code branch of the method relating to these first two tests, but no green markers for the rest of the method.

Any clues?

Dan
danhaywood
#4 Posted : Thursday, May 17, 2012 10:00:27 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 5/17/2012(UTC)
Posts: 3
Location: UK

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
OK, figured it out. I had forgotten the stupid:

public TestContext TestContext { get; set; }

that mstest needs. Adding it in and everything is now working.

Dunno if that's a repeatable problem and/or worth documenting in your wiki.

Thanks again for the quick turnaround. I know you've been holding off making ncrunch a paid-for product while you get the stability up, but it seems to me that you are pretty close. I'd certainly pay for it if you did so (but am too lazy to do a PayPal donation in the meantime).

Dan
1 user thanked danhaywood for this useful post.
Remco on 5/17/2012(UTC)
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download