2

We were on 8.2.3 and I am trying to get our instance up to 9.3. I started with a vanilla 9.3 initial install and installed an update to apply our custom renderings, templates, etc. At the end of the installation I got the error below:

Method 'Finalise' in type 'Glass.Mapper.Sc.IoC.DependencyResolver' from assembly 'Glass.Mapper.Sc, Version=4.3.4.197, Culture=neutral, PublicKeyToken=null' does not have an implementation.

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.TypeLoadException: Method 'Finalise' in type 'Glass.Mapper.Sc.IoC.DependencyResolver' from assembly 'Glass.Mapper.Sc, Version=4.3.4.197, Culture=neutral, PublicKeyToken=null' does not have an implementation.

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:

[TypeLoadException: Method 'Finalise' in type 'Glass.Mapper.Sc.IoC.DependencyResolver' from assembly 'Glass.Mapper.Sc, Version=4.3.4.197, Culture=neutral, PublicKeyToken=null' does not have an implementation.]
Dkg.Web.App_Start.GlassMapperScCustom.CreateResolver() +0
Dkg.Web.App_Start.GlassMapperSc.Start() +11 (Object , Object ) +9
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +236 Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Nexus.Web.HttpModule.Application_Start() +220
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +1145
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +580
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +165
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +267
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341

[HttpException (0x80004005): Method 'Finalise' in type 'Glass.Mapper.Sc.IoC.DependencyResolver' from assembly 'Glass.Mapper.Sc, Version=4.3.4.197, Culture=neutral, PublicKeyToken=null' does not have an implementation.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688

1
  • Check if you have maybe double .config files for Glass Mapper. If you had already some configs in your project and then you installed Glass from nuget, it will add its config again and you may see exceptions like that.
    – Marek Musielak
    Jul 24, 2020 at 7:33

1 Answer 1

2

I know about 3 reasons that could be the issue:

  • Check if you have maybe double .config files for Glass Mapper. If you had already some configs in your project and then you installed Glass from nuget, it will add its config again and you may see exceptions like that.
  • You have old versions of Glass mapper dll files in your bin folder. Check all of them if they are correct (especially look at Glass.Mapper.dll).
  • Some of your projects still reference old Glass.Mapper.Sc.Core nuget package instead of new Glass.Mapper.Sc.93.Core. Use "Manage nuget packages for your solutionoption and findGlass.Mapper.Sc.Core` in installed packages.
4
  • 1. I found 2 configus which mention Glass, but they don't seem to be to be in conflict: Glass.Mapper.Sc.config and Glass.Mapper.Sc.start.config. ******* 2. I'm not sure how to check versions of the dlls, can you provide guidance? ******* 3. I have the most recent of Glass on the project but should I have both "Glass.Mapper.Sc" and "Glass.Mapper.Sc.Core"? I have both installed (always has been).
    – Michael
    Jul 27, 2020 at 14:03
  • In older Sitecore version there was Glass.Mapper.Sc.Core nuget package. Now it should be Glass.Mapper.Sc.93.Core with .93. (or other Sitecore version) in its name. Make sure you don't include the nuget package without the number
    – Marek Musielak
    Jul 27, 2020 at 14:04
  • 1
    Upgrading to the glass mapper version you told me seems to have resolved this problem. A new error has occurred, but I'll start a new post on that error if I can't figure it out. Thank you for your help. Marking this as the answer.
    – Michael
    Jul 27, 2020 at 16:47
  • Removing all GlassMapper references and re-adding them solved the issue.
    – Dash
    Mar 12, 2021 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.