Build/Test Issues

Stalling at: Running (First time run)

Started by PyroMoth on 6,827 views

I have used NCrunch at work and been raving about it, I am now trying to use it on my personal machine, but the tests never finish their first run.

The test is nothing complicated, Assert.AreEqual(1,2);

Builds and Visual Studio testing are working fine.

The output is showing the following error:

[09:32:51.8924-TestExecutionTask-36] ERROR (Internal): System.ArgumentException: Unable to obtain public key for StrongNameKeyPair.
   at System.Reflection.StrongNameKeyPair.ComputePublicKey()
   at System.Reflection.StrongNameKeyPair.get_PublicKey()
   at System.Reflection.Emit.AssemblyBuilder..ctor(AppDomain domain, AssemblyName name, AssemblyBuilderAccess access, String dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, StackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes, SecurityContextSource securityContextSource)
   at System.Reflection.Emit.AssemblyBuilder.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, StackCrawlMark& stackMark, IEnumerable`1 unsafeAssemblyAttributes, SecurityContextSource securityContextSource)
   at System.AppDomain.InternalDefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access, String dir, Evidence evidence, PermissionSet requiredPermissions, PermissionSet optionalPermissions, PermissionSet refusedPermissions, StackCrawlMark& stackMark, IEnumerable`1 assemblyAttributes, SecurityContextSource securityContextSource)
   at System.AppDomain.DefineDynamicAssembly(AssemblyName name, AssemblyBuilderAccess access)
   at InAssembly_Castle.DynamicProxy.ModuleScope.#=qdS7CflZSEeFzJZtlZrw5jg==(Boolean #=q5J27YkM$vxxs5rDSGa$UxQ==)
   at InAssembly_Castle.DynamicProxy.ModuleScope.ObtainDynamicModuleWithStrongName()
   at InAssembly_Castle.DynamicProxy.ModuleScope.DefineType(Boolean inSignedModulePreferably, String name, TypeAttributes flags)
   at InAssembly_Castle.DynamicProxy.Generators.Emitters.ClassEmitter..ctor(ModuleScope modulescope, String name, Type baseType, IEnumerable`1 interfaces, TypeAttributes flags, Boolean forceUnsigned)
   at InAssembly_Castle.DynamicProxy.Generators.BaseProxyGenerator.BuildClassEmitter(String typeName, Type parentType, IEnumerable`1 interfaces)
   at InAssembly_Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateType(String name, Type[] interfaces, INamingScope namingScope)
   at InAssembly_Castle.DynamicProxy.Generators.ClassProxyGenerator.#=qw7UTuqkEyzE3dtPDHbyR8CjWtuwAOYSPQuHIWzyjPRg=.#=qtrn98mYhhxQETNCmTKS2xlWk_bQMPhBLISI1GiC8k1A=(String #=qCciJQgM4Qiwzz4z4JLiaOg==, INamingScope #=q_HHqo9Qjh9ggRo$3Ig6jiw==)
   at InAssembly_Castle.DynamicProxy.Generators.BaseProxyGenerator.ObtainProxyType(CacheKey cacheKey, Func`3 factory)
   at InAssembly_Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode(Type[] interfaces, ProxyGenerationOptions options)
   at InAssembly_Castle.DynamicProxy.DefaultProxyBuilder.CreateClassProxyType(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options)
   at InAssembly_Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors)
   at nCrunch.TestExecution.Frameworks.MSTest.MSTestInterceptingContext..ctor()
   at nCrunch.TestExecution.Frameworks.MSTest.MSTestFramework.InitialiseFrameworkForExecution(String solutionDirectory, String testAssemblyPath, Int32 defaultTimeout)
   at nCrunch.TestExecution.RemoteTaskRunner.#=qZWpQ9Fw22coT4CYtVCQtBhy6_ObFkRjwoNz3BHL7LTQ=(Type #=q1APDvnYbnncAEGFyjNsjXDgNdldLD1p4qgqUZXeCdLc=)
   at nCrunch.TestExecution.RemoteTaskRunner.RunTests(IMasterExecutionMap[] masterExecutionMaps, IList`1 testsToRun, Type testFrameworkType, Boolean considerInconclusiveTestsAsPassing)
Hi, thanks for posting!

This is a rare problem that is caused by something in the security configuration of your workstation/user account. You may also find that other libraries or tools that you use could exhibit similar problems. Have a look at [url](- BROKEN LINK -)[/url] for more information.
Thanks Remco,

In the end I solved it by allowing 'Users' full control of the NCrunch folder within Users\*User*\AppData\Local and Users\*User*\AppData\Roaming.

I think it may be down to UAC installing NCrunch at administrator level.

Keep up the great work!

~James

Post a reply

Log in to reply.