I did a new install of NCrunch and was able to uses it for a few hours. However after restarting VS NCrunch does not run. The menu items are enabled, but when I open the Tests window there are no test and the engine is not running. I am using VS enterprise 2019 with Resharper, CodeMaid and Specflow extensions.
After uninstalling NCrunch, removing all NCrunch files in my solution, rebooting, reinstalling NCrunch and opening my solution I get a dialog with "Last Chosen Setting". NCrunch is leaving files on my system after uninstall (very bad!). If I need to remove these files where are they?
When NCrunch is in this state, does the 'Enable' option in the NCrunch menu work or create any kind of result? Do you have the option to Submit Bug Report from the NCrunch menu, and if so, could you try submitting a report?
rjmccabe wrote:
After uninstalling NCrunch, removing all NCrunch files in my solution, rebooting, reinstalling NCrunch and opening my solution I get a dialog with "Last Chosen Setting". NCrunch is leaving files on my system after uninstall (very bad!). If I need to remove these files where are they?
These files are stored under your local user profile (i.e. C:\Users\Remco\AppData\Roaming\NCrunch). Delete as you see fit.
I've just found a bug report submitted with symptoms similar to what you've just described (I'm I guessing this was from you). The exception encountered in NCrunch is below:
System.TypeInitializationException: The type initializer for 'nCrunch.Common.IO.PathHelper' threw an exception. ---> System.IO.IOException: The path 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools"' could not be processed because it is not of legal form
at nCrunch.Common.IO.DiskPath..ctor(String absolutePath, Boolean pathIsChecked)
at nCrunch.Common.IO.DirectoryPath.FromAbsolutePath(String absoluteFilePath)
at nCrunch.Common.VsInstallationFinder.GetVSInstallPath(VisualStudioVersion vsVersion)
at nCrunch.Common.IO.PathHelper..cctor()
--- End of inner exception stack trace ---
at nCrunch.Common.IO.PathHelper.MakeAbsolutePathRelative(String absolutePathToMakeRelative, String relativeToAbsoluteDir)
at nCrunch.Common.ComponentUniqueName..ctor(FilePath projectFilePath, DirectoryPath solutionDirectory, String targetFramework)
at nCrunch.VSAddIn.Synchronisation.Solution.(FilePath , String[] )
at nCrunch.VSAddIn.Synchronisation.Solution.(DteSolutionOpenedEvent )
The system is failing when trying to find the installation of VS. I think this is caused by a malformed environment variable on your system. Can you check if NCrunchVSInstallPath.VS2019 is set to a valid path? Maybe clear this variable if it exists.