Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have upgraded Umbraco from 8.11.1 to 8.18.4. I have cleaned every project - deleted temp files etc. But lightinject / dependency lookup keeps failing .
The place where it fails is pretty trivial - its an injection of a class wrapping some helper methods for ConfigurationManager
Does anybody have an idea what to do next?
Bit of a guess, but does the injected class 'wrap' UmbracoHelper or UmbracoContext??
If so it might be that there is no guarantee of a Context being available if you are outside of a Http Request...
... if that is the case...
Then you'd need to inject UmbracoContextFactory and use EnsureUmbracoContext:
some info here:
But apologies if you are already doing this!
Have just seen this be the issue before for people.
Unfortunately thats not the case at least for this class - its a wrap around ConfigurationManager (system.configuration)
Regards Henrik Farnø
I have an update. I am able to reproduce this in an upgrade from 8.11.1 to 8.11.2 . First I did the nuget upgrade and it failed with the same error
I then manually updated the umbraco.dlls to 8.11.2. and added the 2 updated dlls. Angel.css and HtmlSanitizer and the same result occurs
Problem solved - I added this attribute to the failing dependencies:
[RuntimeLevel(MaxLevel = RuntimeLevel.Run)]
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted