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

Notification

Icon
Error

NCrunch is stucked during initialization
alvas
#1 Posted : Tuesday, April 25, 2023 6:34:54 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
Hello,

I've tried to reinstall my Visual Studio 2022 Pro (version 17.5.4) and NCrunch (version 4.16.0.4), but still NCrunch is not working - blue icon is spinning forever.
I've tried to delete .vs folder - no success.
I've tried to run in compatibility mode - no success


Tested with the simplest unit test (xUnit & MSTests).
Previous version of extensions was removed from VS extensions folder.
Command dotnet test is working as expected.
I could run unit test from VS without any errors.

P.S. Write me if you need diagnostic logs.
Remco
#2 Posted : Tuesday, April 25, 2023 12:35:10 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for sharing this issue.

Could you submit a bug report shortly after trying to enable NCrunch? There's an option under the NCrunch menu that should allow you to do this.

The bug report contains a log file that I hope will show me why the engine is failing to initialise.
1 user thanked Remco for this useful post.
alvas on 4/25/2023(UTC)
alvas
#3 Posted : Tuesday, April 25, 2023 12:42:50 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
Remco;16624 wrote:

Could you submit a bug report shortly after trying to enable NCrunch? There's an option under the NCrunch menu that should allow you to do this.


Yes, I've submitted.
Remco
#4 Posted : Wednesday, April 26, 2023 12:57:51 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Thanks for sending through the report.

There is a surprising lack of error information in the log. We may need to do some further investigation on your side to try and narrow down what is happening here.

Has NCrunch ever worked for you before on this system? If so, can you make any guesses on which change may have caused this to start happening?

Does this happen for every solution on your machine? Are there any of the VS project templates that work?

Are you running any other extensions in VS?
alvas
#5 Posted : Wednesday, April 26, 2023 4:41:58 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
Remco;16626 wrote:
Has NCrunch ever worked for you before on this system? If so, can you make any guesses on which change may have caused this to start happening?

Yes, it was working until VS studio update. But for rest of our company NCrunch is working fine.

Remco;16626 wrote:
Does this happen for every solution on your machine?

Yes, for every solution, in different folders.

Remco;16626 wrote:
Are there any of the VS project templates that work?

There is no working templates on this machine.

Remco;16626 wrote:
Are you running any other extensions in VS?

I've tried NCrunch after re-installing VS, so it was empty. Now I'm using Resharper and CodeMaid. But the same setup was working for me and is still working for others.
Remco
#6 Posted : Wednesday, April 26, 2023 4:53:56 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Could you try downloading the NCrunch console tool and checking whether this works on your system? This is looking like a problem with your environment. The console tool will tell us if this is something in the underlying toolset, or whether it's VS itself.
alvas
#7 Posted : Wednesday, April 26, 2023 5:28:20 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
I've tried with global NCrunch setting and the one in solution, but I'm not sure that I've ran it correctly.

Code:

.\NCrunch.exe C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.sln /c C:\Users\xxx\AppData\Roaming\NCrunch\globalconfig.crunch.v3.xml  -NCrunchCacheStoragePath C:\Temp\NCrunchCacheStoragePathToDelete


[PID:31608 08:07:07.831 Core-4] Console tool is using engine mode:  [Undetermined]
[PID:31608 08:07:07.831 Core-4] Beginning end-to-end run of solution using tools from VS version 'VS2022'
[PID:31608 08:07:12.581 ?-1] Reporting engine execution results
Execution result based on (ConsoleOutput):

Load errors: False
Failed tasks: False
Failed tests: False
Not run tests: False
Impacted tests:


Result: OK
[PID:31608 08:07:13.222 ?-1] Shutting down engine


Code:

.\NCrunch.exe C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.sln /c C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.v3.ncrunchsolution.user  -NCrunchCacheStoragePath C:\Temp\NCrunchCacheStoragePathToDelete

[PID:21764 08:08:06.0263 ?-1] ERROR: Setting 'CurrentEngineMode' was not loaded from ConsoleApp1.v3.ncrunchsolution.user
The setting 'CurrentEngineMode' was not loaded from the NCrunch configuration file at 'C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.v3.ncrunchsolution.user' because this setting has been declared in a scope where it is not applicable.  Due to limitations in the engine, not all settings can be applied at all levels in the configuration system.  If you are attempting to define this setting manually in XML, please inspect the configuration UI to see where it can be applied.
[PID:21764 08:08:06.0263 ?-1] ERROR: Setting 'ProcessingQueueSplitterDistance' was not loaded from ConsoleApp1.v3.ncrunchsolution.user
The setting 'ProcessingQueueSplitterDistance' was not loaded from the NCrunch configuration file at 'C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.v3.ncrunchsolution.user' because this setting has been declared in a scope where it is not applicable.  Due to limitations in the engine, not all settings can be applied at all levels in the configuration system.  If you are attempting to define this setting manually in XML, please inspect the configuration UI to see where it can be applied.
[PID:21764 08:08:06.0263 ?-1] ERROR: Setting 'TestsWindowMenuOptions' was not loaded from ConsoleApp1.v3.ncrunchsolution.user
The setting 'TestsWindowMenuOptions' was not loaded from the NCrunch configuration file at 'C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.v3.ncrunchsolution.user' because this setting has been declared in a scope where it is not applicable.  Due to limitations in the engine, not all settings can be applied at all levels in the configuration system.  If you are attempting to define this setting manually in XML, please inspect the configuration UI to see where it can be applied.
[PID:21764 08:08:06.0263 ?-1] ERROR: Setting 'TestsWindowSplitterDistance' was not loaded from ConsoleApp1.v3.ncrunchsolution.user
The setting 'TestsWindowSplitterDistance' was not loaded from the NCrunch configuration file at 'C:\Users\xxx\source\repos\ConsoleApp1\ConsoleApp1.v3.ncrunchsolution.user' because this setting has been declared in a scope where it is not applicable.  Due to limitations in the engine, not all settings can be applied at all levels in the configuration system.  If you are attempting to define this setting manually in XML, please inspect the configuration UI to see where it can be applied.
[PID:21764 08:08:06.2923 Core-4] Console tool is using engine mode:  [Undetermined]
[PID:21764 08:08:06.3083 Core-4] Beginning end-to-end run of solution using tools from VS version 'VS2022'
[PID:21764 08:09:48.2763 ?-1] Reporting engine execution results
Execution result based on (ConsoleOutput):

Load errors: False
Failed tasks: False
Failed tests: True
Not run tests: False
Impacted tests:


Result: TestFailure
[PID:21764 08:09:49.2923 ?-1] Shutting down engine
Remco
#8 Posted : Wednesday, April 26, 2023 6:09:16 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
When the console tool completes its run, it should output a bunch of reports under a subdirectory next to your solution file. This is where you can establish whether the run managed to load the projects and run through the tests (the console logging is not verbose enough to tell from the direct output, though you can change this).
alvas
#9 Posted : Wednesday, April 26, 2023 7:21:35 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
There is no errors running console tool.
I didn't find how to attach any image or log file here :)
Remco
#10 Posted : Wednesday, April 26, 2023 12:36:56 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
OK - This narrows down the problem to VS itself.

Could you try running VS using the following commandline?

devenv.exe /rootsuffix Exp

This should load VS with a different registry root, which will spawn an instance with the configuration entirely reset. My theory is that the problem is caused by a VS configuration issue. Testing NCrunch under the above instance may help us to confirm this.
alvas
#11 Posted : Wednesday, April 26, 2023 1:15:40 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 4/25/2023(UTC)
Posts: 6

Thanks: 1 times
Remco;16633 wrote:
Could you try running VS using the following commandline?

devenv.exe /rootsuffix Exp


I've tried, same problem. And I've submitted bug report after this.

Remco
#12 Posted : Wednesday, April 26, 2023 11:26:55 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Ok, the next thing to try is a complete reset of VS settings, uninstall VS entirely, then reinstall: https://superuser.com/questions/1663409/how-to-fully-reset-all-visual-studio-settings-to-factory-defaults.

I'm hopeful this will solve the issue. If not, the next step will probably be a diagnostic build.
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.067 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download