1
Vote

Unexpected exception while loading explorations

description

When running Pex Explorations in VS2008 on a modified version of your StringLib.Capitalize example, I occassionally receive the following error after the "monitoring from cold start" text finishes:
 
--- Description
unexpected exception while loading explorations
 
--- Exception details

Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics.SafeAssertionException: could not resolve .ctor method System.Void NUnit.Framework.TestFixtureAttribute..ctor() at System.Exception Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics.SafeDebug.Throw(System.Exception ex)
  at System.Exception Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics.SafeDebug.FatalFail(System.String message) 
  at System.Exception Microsoft.ExtendedReflection.Utilities.Safe.Diagnostics.SafeDebug.FatalFail(System.String format, System.Object[] args) 
  at System.Reflection.ConstructorInfo Microsoft.ExtendedReflection.Metadata.DynamicCodeManager+EmitterVisitor.GetRuntimeConstructor(Microsoft.ExtendedReflection.Metadata.Interfaces.IRuntimeMetadataResolver resolver, Microsoft.ExtendedReflection.Metadata.Interfaces.IMethod ctor) 
  at System.Reflection.Emit.CustomAttributeBuilder Microsoft.ExtendedReflection.Metadata.DynamicCodeManager+EmitterVisitor.CreateAttribute(Microsoft.ExtendedReflection.Metadata.ICustomAttribute attribute) 
  at System.Void Microsoft.ExtendedReflection.Metadata.DynamicCodeManager+EmitterVisitor.EmitCustomAttributes(Microsoft.ExtendedReflection.Metadata.Builders.TypeDefinitionBuilder member, System.Reflection.Emit.TypeBuilder builder) 
  at System.Void Microsoft.ExtendedReflection.Metadata.DynamicCodeManager+EmitterVisitor.VisitTypeDefinition(Microsoft.ExtendedReflection.Metadata.DynamicCodeManager+Void parameter, Microsoft.ExtendedReflection.Metadata.Interfaces.ITypeDefinition typeDefinition) 
  at System.Boolean Microsoft.ExtendedReflection.Metadata.DynamicCodeManager.TryCreateType(Microsoft.ExtendedReflection.Metadata.Builders.TypeDefinitionBuilder typeDefinitionBuilder, System.Type& result) 
  at System.Boolean Microsoft.Pex.Engine.Reflection.PexWizardReflectorFactory+WizardReflector.TryCreateTestType(Microsoft.ExtendedReflection.Metadata.TypeDefinition typeDefinition, Microsoft.ExtendedReflection.Metadata.TypeEx& testType, Microsoft.ExtendedReflection.Metadata.Builders.TypeDefinitionBuilder& testTypeBuilder) 
  at System.Void Microsoft.Pex.Engine.Reflection.PexWizardReflectorFactory+WizardReflector.ReflectAssembly(Microsoft.Pex.Engine.PexAssembly assembly, Microsoft.ExtendedReflection.Metadata.AssemblyEx testAssembly) 
  at System.Void Microsoft.Pex.Engine.Reflection.PexReflectorBase.Microsoft.Pex.Engine.Reflection.IPexReflector.Reflect(Microsoft.Pex.Engine.PexAssembly assembly, Microsoft.ExtendedReflection.Metadata.AssemblyEx testAssembly) 
  at System.Void Microsoft.Pex.Engine.Reflection.PexWizardReflectorFactory+IncrementalReflector.Reflect(Microsoft.Pex.Engine.PexAssembly assembly, Microsoft.ExtendedReflection.Metadata.AssemblyEx testAssembly) 
  at System.Int32 Microsoft.Pex.Engine.Drivers.PexDriver.Reflect()

comments

JudahGabriel wrote Nov 14, 2008 at 9:47 PM

This seems to happen only on cold-start of the monitoring process.

JudahGabriel wrote Nov 14, 2008 at 9:48 PM

Scratch that, I get the exception on warm starts too.

JudahGabriel wrote Nov 14, 2008 at 9:49 PM

More info: I'm using the Pex NUnit extension.

BKStrelioff wrote Jan 11, 2009 at 9:47 PM

I just went through the StringExtensions exercises without seeing any errors. If you are still seeing problems, can you post or email me (BKStrelioff@Hotmail.com) your source code for the example that you are seeing problems with.

Thanks

pelikhan wrote Jan 12, 2009 at 2:53 AM

Make sure nunit.framework.dll is actually copied in the bin folder.