Build error on 29 May 2012

Topics: General
May 29, 2012 at 3:28 PM

I pulled a fresh copy of aspnetwebstack this morning (29 May 2012) and tried to build. I get the following error and have no idea how to get past it:

  xUnit.net MSBuild runner (32-bit .NET 4.0.30319.269)
  xUnit.net MSBuild runner (32-bit .NET 4.0.30319.269)
  xunit.dll:     Version 1.9.0.1566
  Test assembly: C:\P\APC\psb\SB_PimsFamilyOlefinDevMain\aspnetwebstack\AspenTech\aspnetwebstack\bin\ReleasetestMicrosoft.Web.Http.Data.Test.dll
  xunit.dll:     Version 1.9.0.1566
  Test assembly: C:\P\APC\psb\SB_PimsFamilyOlefinDevMain\aspnetwebstack\AspenTech\aspnetwebstack\bin\ReleasetestMicrosoft.Web.Helpers.Test.dll

Unhandled Exception: System.TypeLoadException: Method 'Initialize' in type 'Microsoft.Web.Http.Data.DataControllerConfigurationAttribute' from assembly 'Microsoft.Web.Http.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not have an implementation.
   at System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
   at System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
   at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments)
   at System.Reflection.CustomAttribute.FilterCustomAttributeRecord(CustomAttributeRecord caRecord, MetadataImport scope, Assembly& lastAptcaOkAssembly, RuntimeModule decoratedModule, MetadataToken decoratedToken, RuntimeType attributeFilterType, Boolean mustBeInheritable, Object[] attributes, IList derivedAttributes, RuntimeType& attributeType, IRuntimeMethodInfo& ctor, Boolean& ctorHasParameters, Boolean& isVarArg)
   at System.Reflection.CustomAttribute.IsCustomAttributeDefined(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, RuntimeType attributeFilterType, Boolean mustBeInheritable)
   at System.Reflection.CustomAttribute.IsDefined(RuntimeType type, RuntimeType
caType, Boolean inherit)
   at System.RuntimeType.IsDefined(Type attributeType, Boolean inherit)
   at Xunit.Sdk.Reflector.ReflectionTypeInfo.HasAttribute(Type attributeType)
   at Xunit.Sdk.TypeUtility.HasRunWith(ITypeInfo type)
   at Xunit.Sdk.TypeUtility.IsTestClass(ITypeInfo type)
   at Xunit.Sdk.TestClassCommandFactory.Make(ITypeInfo typeInfo)
   at Xunit.Sdk.Executor.RunAssembly.<>c__DisplayClass9.<.ctor>b__4()
   at Xunit.Sdk.Executor.ThreadRunner(Object threadStart)
   at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart(Object obj)

**** BUILD SUCCESSFUL ***

 

I'm building on a Win7 64-bit system with VS2010 SP1 and MVC4 beta installed.

Coordinator
May 29, 2012 at 8:07 PM

Unfortunately you can’t build on a machine with MVC 4 already installed. You need to uninstall MVC 4 Beta.

Daniel Roth

May 30, 2012 at 1:19 PM

That was it. I knew that, but forgot it. :-(

I uninstalled MVC4 beta and the build completed (though a number of unit tests failed).  This morning I pulled updates and rebuilt, now all the tests pass and I'm good to go.

Thanks!