Build/Test Issues

Gallio runtime could not be initialized

Started by ChrisB on 5,123 views

Hi, I'm just evaulating NCrunch and it was working great for a few days and then NCrunch couldn't build any of my projects with the following error. I've tried reinstalling NCrunch and manually installing NCrunch and I keep getting the same issue - do you have suggestions for this?

I'm using NCrunch 2.7.0.5 for Visual Studio 2012 with Windows 7 64-bit.

Thanks,
Chris.

System.Exception: An exception was thrown in the remote environment: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Gallio.Runtime.RuntimeException: The runtime could not be initialized. ---> System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: Unrecognized configuration section userSettings. (C:\Users\cb\AppData\Local\Remco_Software_Ltd\nCrunch.TestRunner.AppDom_Url_x13ctxwdzox4i2wigw405uc4bxpgd5ul\2.7.0.5\user.config line 3)
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
--- End of inner exception stack trace ---
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(Object sender, InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(InternalConfigEventArgs e)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(String configPath, BaseConfigurationRecord configRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(String configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, Boolean requestIsHere, Object& result, Object& resultRuntimeObject)
at System.Configuration.BaseConfigurationRecord.GetSection(String configKey)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
at System.Configuration.ConfigurationManager.GetSection(String sectionName)
at Gallio.Runtime.DefaultRuntime.RegisterLoadedPlugins()
at Gallio.Runtime.DefaultRuntime.Initialize()
--- End of inner exception stack trace ---
at Gallio.Runtime.DefaultRuntime.Initialize()
at Gallio.Runtime.RuntimeBootstrap.Initialize(RuntimeSetup setup, ILogger logger)
at nCrunch.Module.Gallio.Integration.GallioInitializer.InitialiseGallioIfNecessary()
at nCrunch.Module.Gallio.Integration.GallioWrapper.GetCustomConfig()
at nCrunch.Module.Gallio.Integration.GallioTestFramework.GetCustomConfig()
at nCrunch.Module.Gallio.Integration.GallioTestFramework.GetDescription()
at nCrunch.TestExecution.Frameworks.TestFrameworkRegistry.GetDescriptionForEachFramework()
at nCrunch.TestExecution.Frameworks.FrameworkDescriptionResolver.GetDescriptionForEachFramework(ModuleExtensionReference[] testFrameworkExtensionReferences)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.#=qTzVAJZZ5P0qRSY$ID5REYPoI3$KK4Wo7z4$YSHRyXg0=(CallMethodMessage #=qstUya4R_bPDeKfn9oE4RFjs3KcStCinV6zfMjgS1nH0=)
at nCrunch.TaskRunner.Ipc.IpcMessageProcessor.ProcessMessageReturningResult(Byte[] data)
at nCrunch.TaskRunner.Ipc.RemoteInstance.#=qw8wqWg7B8FbOj6IMRVANtg==[T](Byte[] #=q1wiwaVeKaJhjohibCiLJag==)
at nCrunch.TaskRunner.Ipc.RemoteInstance.Invoke(IMessage msg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at nCrunch.TestExecution.Frameworks.IFrameworkDescriptionResolver.GetDescriptionForEachFramework(ModuleExtensionReference[] testFrameworkExtensionReferences)
at nCrunch.Core.TestManagement.TestFrameworkDescriptionManager.EnsureDescriptionsAreLoaded()
at nCrunch.Client.ComponentLoader.SnapshotComponentFactory.CreateSnapshotComponentFromXml(FilePath projectFilePath, BuildXml projectXml, FilePath solutionFilePath, String[] additionalFilesToIncludeAtSolutionLevel, Boolean isLoadedFromFile, ISnapshotConfig snapshotConfig, VisualStudioVersion vsVersion)
Hi Chris,

Thanks for posting!

This is a very interesting file (C:\Users\cb\AppData\Local\Remco_Software_Ltd\nCrunch.TestRunner.AppDom_Url_x13ctxwdzox4i2wigw405uc4bxpgd5ul\2.7.0.5\user.config), it isn't created by anything in the NCrunch codebase. I suppose it's possible that Gallio is creating it. Would you be able to try removing the Remco_Software_Ltd directory? NCrunch doesn't use this and it looks like there is another piece of software involved here trying to do something strange. To be safe, it may be worth renaming or moving this directory in case it does contain something necessary.

Are you making use of Xunit or MbUnit for your work? If not, one option is to remove the NCrunch.GallioIntegration.plugin file from the NCrunch installation. This will prevent it from loading the Gallio plugin, which appears to be the component kicking up this error.

Do you have any version of Gallio separately installed on your machine?


Cheers,

Remco
Hi Remco,

Thanks for your reply - removing that directory seems to have done the trick and NCrunch is happily building/testing again!

I'm not aware of using gallio else where, I'm using NUnit for testing. I've got Resharper and Visual Assist installed.

The user.config file contained one of my project property settings which is really strange.

Thanks again for all your help,
Chris.
Hi Chris,

Great to hear! Let me know if you ever manage to narrow down what created this file.

Post a reply

Log in to reply.