Setup Problems

Visual Studio 2017 gives an error message "nCrunch package did not load correctly" at startup

Started by rsullivan on 8,244 views

I'm a trial account using NCrunch, and in the last day or two, the NCrunch addin to Visual Studio 2017 stopped loading.

I get this error popup every time that Visual Studio starts:

[img=https://i.imgur.com/niSKawh.png]rsullivan's NCrunch Loan Failure in Visual Studio 2017[/img].

After Visual Studio starts, when I click on any item in the NCrunch menu, I get the same popup. Nothing in NCrunch works.

I have looked at the ActivityLog.xml file, and it seems like NCrunch is crashing when it attempts to load its configuration information. Judge for yourself:

<entry>
<record>1047</record>
<time>2017/10/19 21:03:32.034</time>
<type>Information</type>
<source>VisualStudio</source>
<description>Begin package load [nCrunch.VSIntegration2010.CrunchPackage, nCrunch.VSIntegration2017, Version=3.11.0.9, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea]</description>
<guid>{14D2CAB3-EE7F-496E-BF5D-C67D2CBDD84D}</guid>
</entry>
<entry>
<record>1048</record>
<time>2017/10/19 21:03:32.893</time>
<type>Error</type>
<source>VisualStudio</source>
<description>LegacySitePackage failed for package [nCrunch.VSIntegration2010.CrunchPackage, nCrunch.VSIntegration2017, Version=3.11.0.9, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea]Source: &apos;mscorlib&apos; Description: Input string was not in a correct format.&#x000D;&#x000A;System.FormatException: Input string was not in a correct format.&#x000D;&#x000A; at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer&amp; number, NumberFormatInfo info, Boolean parseDecimal)&#x000D;&#x000A; at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)&#x000D;&#x000A; at nCrunch.Core.Configuration.CPUCoreConfigHelper.&#x0002;.&#x0003;(String &#x0002;)&#x000D;&#x000A; at System.Linq.Enumerable.WhereSelectArrayIterator`2.MoveNext()&#x000D;&#x000A; at nCrunch.Core.Configuration.CPUCoreConfigHelper.GetCoreMaskFromCoreDescriptor(String coreDescriptor)&#x000D;&#x000A; at nCrunch.Client.ClientThreadAffinitiser.ApplyProcessorAffinityToAllThreads()&#x000D;&#x000A; at nCrunch.VSAddIn.VsServiceInitialiser.InitialiseServiceLocator(Boolean isVSRuntimeEnvironment, Nullable`1 vsVersion)&#x000D;&#x000A; at nCrunch.WpfUI.WpfServiceInitialiser.InitialiseServiceLocator(Boolean isRuntimeEnvironment, Nullable`1 vsVersion)&#x000D;&#x000A; at nCrunch.VSIntegration2010.CrunchPackage.Initialize()&#x000D;&#x000A; at Microsoft.VisualStudio.Shell.Package.Microsoft.VisualStudio.Shell.Interop.IVsPackage.SetSite(IServiceProvider sp)</description>
<guid>{14D2CAB3-EE7F-496E-BF5D-C67D2CBDD84D}</guid>
<hr>80131537</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1049</record>
<time>2017/10/19 21:03:32.909</time>
<type>Error</type>
<source>VisualStudio</source>
<description>SetSite failed for package [nCrunch.VSIntegration2010.CrunchPackage, nCrunch.VSIntegration2017, Version=3.11.0.9, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea](null)</description>
<guid>{14D2CAB3-EE7F-496E-BF5D-C67D2CBDD84D}</guid>
<hr>80131537</hr>
<errorinfo></errorinfo>
</entry>
<entry>
<record>1050</record>
<time>2017/10/19 21:03:32.909</time>
<type>Error</type>
<source>VisualStudio</source>
<description>End package load [nCrunch.VSIntegration2010.CrunchPackage, nCrunch.VSIntegration2017, Version=3.11.0.9, Culture=neutral, PublicKeyToken=01d101bf6f3e0aea]</description>
<guid>{14D2CAB3-EE7F-496E-BF5D-C67D2CBDD84D}</guid>
<hr>80131537</hr>
<errorinfo></errorinfo>
</entry>


I would be happy to nuke/reset the NCrunch configuration, but I don't how.

I have attempted to reinstall and fix using the reinstall instructions, with no luck. In the reinstall instructions, it says to "Using windows explorer, browse to the directory: \Program Files (x86)\Microsoft Visual Studio\2017\{VERSION}\Common7\IDE\Extensions\Remco Software". I found the Extensions folder, but the "Remco Software" folder didn't exist after uninstalling NCrunch. I have verified that it gets created after installation, so I'm 100% sure that the uninstalling NCrunch removes this folder for me (leaving no remnants that need to be deleted).

I have even uninstall NCrunch and uninstalled Visual Studio 2017, and still get the same error.

If I cannot get this to run, I'll have to report to my group that I cannot get NCrunch working without wiping out my computer and re-installing everything. I'm evaluating this software (with another developer), so I recommend that you help me out, or else this will be a black mark in our report. Prior to this problem, I was really impressed!

Please help!

Edited

Hi, thanks for sharing this problem.

You are correct in your understanding that this is caused by a configuration corruption issue. We have a fix pending for this issue in the next release, though it still isn't clear how it's possible for the config to get into this state.

To reset your configuration, delete the config file at C:\Users\USER\AppData\Roaming\NCrunch
Remco wrote:Hi, thanks for sharing this problem.

You are correct in your understanding that this is caused by a configuration corruption issue. We have a fix pending for this issue in the next release, though it still isn't clear how it's possible for the config to get into this state.

To reset your configuration, delete the config file at C:\Users\USER\AppData\Roaming\NCrunch


That worked! My NCrunch is working again!

Thank you!
I also encountered this issue after installing the latest NCrunch Update (3.12.0.15). After following the advice above as well as doing a full reinstall and devenv setup as described in the NCrunch docs, I had additional problems. While the installation wizard completed every time I ran the msi installer, the NCrunch extension did not appear in Visual Studio.

Finally, I figured out that the NCrunch installer was putting the files into the preview version of VS that was installed on my machine (parallel to the production release version of VS).

I uninstalled the preview version of VS. Then I installed the latest NCrunch update. After several hours of chasing my tail, everything seems to be working again.

Two lessons learned:

1. The NCrunch installer selects the preview version of VS to install the extension in. (Since running parallel production and preview versions of VS is supported by Microsoft, could the installer be given the intelligence to install for both? Or at least default to production?)

2. I still can’t be certain of what triggered the initial error (as identified at the top of this forum thread), but I suspect it may be related to the parallel VS installations. I’m certain this was the cause of the second issue.

Hopefully this will help someone.
Thanks for sharing this.

dwallace wrote:
1. The NCrunch installer selects the preview version of VS to install the extension in. (Since running parallel production and preview versions of VS is supported by Microsoft, could the installer be given the intelligence to install for both? Or at least default to production?)


Right now the installer does not work with multiple installations of the same version of VS. This is due to the limitations of MSIs in general, which just aren't sophisticated enough to be able to handle this scenario. We're aware of the problem and are trying to find a solution.

dwallace wrote:
2. I still can’t be certain of what triggered the initial error (as identified at the top of this forum thread), but I suspect it may be related to the parallel VS installations. I’m certain this was the cause of the second issue.


VS2017 seems to be having some problems at the moment with the package cache not being refreshed when it should be. This looks to be a new thing, and it seems to be inconsistent. I'm not sure what we can do about this from the NCrunch side other than forcing the installation to run /setup every time, which is something I would prefer to avoid (as we then get other problems).

Post a reply

Log in to reply.