This is a migrated thread and some comments may be shown as answers.

After installing JustMock, I get Token 0x02000001 metadataToken

7 Answers 303 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Iwhp
Top achievements
Rank 1
Iwhp asked on 20 Jun 2013, 04:42 PM
After installing JustMock I get the following message:

        Token 0x02000001 resolves to the special module type representing this module. Parameter name: metadataToken

after I have started a Web Project (this message is shown in Internet Explorer).

I have reinstalled my machine, but it still happens.

Cheers Harry

PS More Information shown in Internet Explorer:

Server Error in '/' Application.

Token 0x02000001 resolves to the special module type representing this module.
Parameter name: metadataToken

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Token 0x02000001 resolves to the special module type representing this module.
Parameter name: metadataToken

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: Token 0x02000001 resolves to the special module type representing this module. Parameter name: metadataToken] System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +820 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) +878 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +917 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean isDecoratedTargetSecurityTransparent) +364 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +345 System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit) +339 WebActivator.AssemblyExtensions.GetActivationAttributes(Assembly assembly) +388 WebActivator.ActivationManager.RunActivationMethods() +411 WebActivator.ActivationManager.RunPreStartMethods() +224 WebActivator.ActivationManager.Run() +243 [InvalidOperationException: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Token 0x02000001 resolves to the special module type representing this module. Parameter name: metadataToken.] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +748 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +290 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +309 System.Web.Compilation.BuildManager.ExecutePreAppStart() +288 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +895 [HttpException (0x80004005): The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Token 0x02000001 resolves to the special module type representing this module. Parameter name: metadataToken.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +725 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +283 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +420 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045             
    

7 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 21 Jun 2013, 07:23 AM
Hello Harry,

Thank you for reporting this.

Our development team managed to fix it and it should be included in the upcoming JustMock 2013 Q2 SP1. The service pack should be alive by the end of June or at latest in the beginning of July.

I hope this works for you.

P.S. For reporting the bug, we have granted you some Telerik points.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
0
Neil
Top achievements
Rank 1
answered on 24 Jun 2013, 02:39 AM
This may be resolved now as already discussed, but I also had this occur in a Windows Forms app that we were using as a test WCF service host.  Simply when attempting to open the service host as per below:

m_serviceHost = New ServiceHost(GetType(T))
m_serviceHost.Open()

We'd get the same exception.  Uninstalling JustMock fixed this.  Thankfully this post was here or I might have spent a lot of time trying to resolve this.  This also makes JustMock pretty well unusable at the moment (when installed anyway).

Neil.
0
Kaloyan
Telerik team
answered on 24 Jun 2013, 07:07 AM
Hello Neil,

Thank you for the feedback.

We are releasing an internal JustMock build today, in which the issue should not be present. Please, feel free to try it out and share any feedback with us.

I hope the information helps.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
0
Iwhp
Top achievements
Rank 1
answered on 25 Jun 2013, 08:04 AM
With the Interim version I get the following error.
Cheers Harry


Server Error in '/' Application.

Could not load file or assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileLoadException: Could not load file or assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[FileLoadException: Could not load file or assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)] System.ModuleHandle.ResolveType(RuntimeModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type) +0 System.ModuleHandle.ResolveTypeHandleInternal(RuntimeModule module, Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +492 System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext) +364 System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[] genericTypeArguments, Type[] genericMethodArguments) +477 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) +878 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes, Boolean isDecoratedTargetSecurityTransparent) +917 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean isDecoratedTargetSecurityTransparent) +364 System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeAssembly assembly, RuntimeType caType) +345 System.Reflection.RuntimeAssembly.GetCustomAttributes(Type attributeType, Boolean inherit) +339 WebActivator.AssemblyExtensions.GetActivationAttributes(Assembly assembly) +391 WebActivator.ActivationManager.RunActivationMethods() +415 WebActivator.ActivationManager.RunPreStartMethods() +227 WebActivator.ActivationManager.Run() +246 [InvalidOperationException: The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Could not load file or assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044).] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +748 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +290 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath) +309 System.Web.Compilation.BuildManager.ExecutePreAppStart() +288 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +895 [HttpException (0x80004005): The pre-application start initialization method Run on type WebActivator.ActivationManager threw an exception with the following error message: Could not load file or assembly 'mscorlib, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044).] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +725 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +283 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +420 


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18045
0
Kaloyan
Telerik team
answered on 25 Jun 2013, 12:16 PM
Hi again Neil,

It is very unfortunate that you are experiencing another issue with our product and we apologize for this.

Our development team managed to fix this as well. It will be included in the next official JustMock build which will be released at latest on Monday (next week).

Thank you for the understanding once again.

Regards,
Kaloyan
Telerik
Share what you think about JustTrace & JustMock with us, so we can become even better! You can use the built-in feedback tool inside JustTrace, our forums, or our JustTrace or JustMock portals.
0
John Saunders
Top achievements
Rank 1
answered on 08 Apr 2014, 02:03 AM
I just received the same error message, but it a totally different context. It occurs when I attempt to edit a TFS 2010 build definition. Steps to reproduce, in Visual Studio 2012 Update 3:

1. In Team Explorer, right-click the  build definition and choose "Edit build definition"
2. Click the "Process" tab
3. Change the "Logging Verbosity" to "Normal" from "Minimal"
4. Press Control-S to save it

The result is as in the attached screen shot. I have been using JustMock in this solution. When I do the same steps from a solution which has no unit tests (thus no JustMock), then editing the build definition succeeds.
0
Kaloyan
Telerik team
answered on 10 Apr 2014, 03:21 PM
Hi John,

Thank you for sharing this. Unfortunately, we were not able to reproduce it on our side. Could you share the exact JustMock version that you have installed?

We apologize for all the inconveniences caused and thank you for the help in advance.

Regards,
Kaloyan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Iwhp
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Neil
Top achievements
Rank 1
Iwhp
Top achievements
Rank 1
John Saunders
Top achievements
Rank 1
Share this question
or