Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hong 66 posts 228 karma points
    Feb 12, 2024 @ 21:31
    Hong
    0

    Exception of type 'Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException' was thrown.

    I have just migrated my Umbraco from 7.15.10 to 13.1.1 with the help of uSync. The contents, the most important part, have been migrated successfully. What a relief! I can see all my blog posts and edit them.

    When I go to the Home tab on the left, I get the following error:

    An error occurred
    Exception of type 'Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException' was thrown.
    
    
    
    Exception Details
    Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException, Umbraco.Web.Common, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null: Exception of type 'Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException' was thrown.
    
    
    at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode)
       at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.CompileAndEmit(String relativePath)
       at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.OnCacheMiss(String normalizedPath)
    --- End of stack trace from previous location ---
       at Microsoft.AspNetCore.Mvc.Razor.Compilation.DefaultRazorPageFactoryProvider.CreateFactory(String relativePath)
       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.CreateCacheResult(HashSet`1 expirationTokens, String relativePath, Boolean isMainPage)
       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.LocatePageFromPath(String executingFilePath, String pagePath, Boolean isMainPage)
       at Microsoft.AspNetCore.Mvc.Razor.RazorViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
       at Umbraco.Cms.Web.Website.ViewEngines.ProfilingViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
       at Microsoft.AspNetCore.Mvc.ViewEngines.CompositeViewEngine.GetView(String executingFilePath, String viewPath, Boolean isMainPage)
       at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.ExecuteAsync(ViewComponentContext context)
       at Microsoft.AspNetCore.Mvc.ViewComponents.ViewViewComponentResult.Execute(ViewComponentContext context)
       at Umbraco.Cms.Web.Common.Macros.PartialViewMacroEngine.Execute(MacroModel macro, IPublishedContent content)
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.<>c__DisplayClass26_0.<ExecuteMacroOfType>b__0()
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.ExecuteProfileMacroWithErrorWrapper(MacroModel macro, String msgIn, Func`1 getMacroContent, Func`1 msgErr)
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.ExecuteMacroWithErrorWrapper(MacroModel macro, String msgIn, String msgOut, Func`1 getMacroContent, Func`1 msgErr)
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.ExecuteMacroOfType(MacroModel model, IPublishedContent content)
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.RenderAsync(MacroModel macro, IPublishedContent content)
       at Umbraco.Cms.Web.Common.Macros.MacroRenderer.RenderAsync(String macroAlias, IPublishedContent content, IDictionary`2 macroParams)
       at Umbraco.Cms.Core.Templates.UmbracoComponentRenderer.RenderMacroAsync(IPublishedContent content, String alias, IDictionary`2 parameters)
       at Umbraco.Cms.Core.Templates.UmbracoComponentRenderer.RenderMacroForContent(IPublishedContent content, String alias, IDictionary`2 parameters)
       at Umbraco.Cms.Web.BackOffice.Controllers.MacroRenderingController.GetMacroResultAsHtml(String macroAlias, Int32 pageId, IDictionary`2 macroParams)
       at Umbraco.Cms.Web.BackOffice.Controllers.MacroRenderingController.GetMacroResultAsHtmlForEditor(MacroParameterModel model)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
       at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
    --- End of stack trace from previous location ---
       at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextExceptionFilterAsync>g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
    

    Could anyone offer a tip about its remedy?

  • Chris Van Oort 110 posts 371 karma points
    Feb 16, 2024 @ 21:23
    Chris Van Oort
    1

    Also getting this error; were you able to solve it?

  • Hong 66 posts 228 karma points
    Feb 16, 2024 @ 21:52
    Hong
    0

    No, unfortunately. I have done all the research I can think of and I am still unable to have a clue.

  • Chris Van Oort 110 posts 371 karma points
    Feb 16, 2024 @ 22:37
    Chris Van Oort
    0

    Do you have any references to IMemberManager? We're seeing some errors like this in Settings --> Logs

    Compilation error occured with message: "error CS1705: Assembly 'Umbraco.Infrastructure' with identity 'Umbraco.Infrastructure, Version=13.1.1.0, Culture=neutral, PublicKeyToken=null' uses 'Microsoft.Extensions.Identity.Stores, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' which has a higher version than referenced assembly 'Microsoft.Extensions.Identity.Stores' with identity 'Microsoft.Extensions.Identity.Stores, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'" Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException: Exception of type 'Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.UmbracoCompilationException' was thrown. at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.CompileAndEmit(RazorCodeDocument codeDocument, String generatedCode) at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.CompileAndEmit(String relativePath) at Umbraco.Cms.Web.Common.ModelsBuilder.InMemoryAuto.CollectibleRuntimeViewCompiler.OnCacheMiss(String normalizedPath) We tried installing the .NET 8 version of Microsoft.Extensions.Identity.Stores Nuget package as well and that did ship, but it didn't solve the problem.

  • Hong 66 posts 228 karma points
    Feb 16, 2024 @ 23:31
    Hong
    0

    No, my instance of Umbraco does not have any reference to IMemberManager. I did a global search but could not find any IMemberManager.

  • Chris Van Oort 110 posts 371 karma points
    Feb 16, 2024 @ 23:06
    Chris Van Oort
    1

    We fixed our issue by:

    • Stopping the Site in IIS and AppPool
    • Delete refs, runtimes, and the two letter folders like "cs" and "ru"
    • Delete the Smidge --> cache directory
    • Delete the umbraco --> data --> TEMP directory
    • Delete all DLL's and EXE's in the root directory of the website
    • Finally re-deploy and start the application pool and website back up
  • Hong 66 posts 228 karma points
    Feb 16, 2024 @ 23:44
    Hong
    0

    Thanks a lot for sharing your solution. I deleted as many folders as I could. I deleted both bin and obj folders, so many folders you mentioned under them were gone. I rebuilt the instance and still got the error. My situation is probably different. I have been trying to upgrade my Umbraco. I think I am approaching the end of my journey in Umbraco. I just need a simple site for blogging, so Umbraco may be overkill.

  • Chris Mahoney 242 posts 454 karma points
    Mar 26, 2024 @ 02:31
    Chris Mahoney
    0

    Thanks: this solution worked at my end for an upgrade from 10.8.5 to 13.2.2 :)

  • ewuski 99 posts 286 karma points
    Apr 13, 2024 @ 12:41
    ewuski
    0

    This error is indicates an issue with the ModelsBuilder which probably tries to generate models in InMemoryAuto mode.

    If you generate your models in the local environment and have ModelsBuilder setup in your local appsettings.Developement.js, eg:

      "Umbraco": {
        "CMS": {
          "ModelsBuilder": {
            "ModelsMode": "SourceCodeAuto",
            "ModelsNamespace": "MyDomain.Models",
            "FlagOutOfDateModels": false,
            "ModelsDirectory": "~/../MyDomain.Models",
            "AcceptUnsafeModelsDirectory": true
          }
        }
      }
    

    and only use them on production, use this in production's appsettings.js:

      "Umbraco": {
        "CMS": {
          "ModelsBuilder": {
            "ModelsMode": "Nothing"
          }
        }
      }
    

    So the ModelsBuilder do not try to generate models in your production environment.

    This solved the above error for me.

Please Sign in or register to post replies

Write your reply to:

Draft