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)
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.
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.
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:
Could anyone offer a tip about its remedy?
Also getting this error; were you able to solve it?
No, unfortunately. I have done all the research I can think of and I am still unable to have a clue.
Do you have any references to
IMemberManager
? We're seeing some errors like this in Settings --> LogsCompilation 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.No, my instance of Umbraco does not have any reference to IMemberManager. I did a global search but could not find any IMemberManager.
We fixed our issue by:
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.
Thanks: this solution worked at my end for an upgrade from 10.8.5 to 13.2.2 :)
This error is indicates an issue with the
ModelsBuilder
which probably tries to generate models inInMemoryAuto
mode.If you generate your models in the local environment and have
ModelsBuilder
setup in your localappsettings.Developement.js
, eg:and only use them on production, use this in production's
appsettings.js
:So the
ModelsBuilder
do not try to generate models in your production environment.This solved the above error for me.
is working on a reply...