I am trying to use Umbraco 8 Composing to run code at startup, but the boot is failing with this error and breaking at line 223 of CoreRuntime.cs
Exception thrown: 'Umbraco.Core.Exceptions.BootFailedException' in Umbraco.Core.dll
Exception thrown: 'Umbraco.Core.Exceptions.BootFailedException' in Umbraco.Core.dll
Here is my Composing code which is based on the example HERE . Without this code, Umbraco Starts OK. So this code is causing the Boot Failure. Any assistance resolving this would be much appreciated:
using System.Linq;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Events;
using Umbraco.Core.Services;
using Umbraco.Core.Services.Implement;
namespace TeraTastic.TT_Classes
{
// Clancy: Added following line 8/26/2020 as suggested at https://codeshare.co.uk/blog/how-to-fix-the-umbraco-core-exceptions-bootfailedexception/
// [RuntimeLevel(MinLevel = RuntimeLevel.Run)]
public class TT_Startup_Composer : IUserComposer
{
public void Compose(Composition composition)
{
// Append our component to the collection of Components
// It will be the last one to be run
composition.Components().Append<TT_Startup_Component>();
}
}
public class TT_Startup_Component : IComponent
{
// Initialize: It will run once when Umbraco starts
public void Initialize()
{
int i = 0;
i++;
i++;
////Listen for when content is being saved
//var myTT_Startup = new TT_Startup();
//// myTT_Startup.Startup(umbracoApplication, applicationContext);
//myTT_Startup.Startup();
}
public void Terminate()
{ }
}
}
Umbraco 8 Composing causing BootFailedException
Hi All,
I am trying to use Umbraco 8 Composing to run code at startup, but the boot is failing with this error and breaking at line 223 of CoreRuntime.cs
Here is my Composing code which is based on the example HERE . Without this code, Umbraco Starts OK. So this code is causing the Boot Failure. Any assistance resolving this would be much appreciated:
Thanks Terry Clancy ClanceZ
Hi all,
I fixed this by including the line
before the line
Thanks
Terry Clancy ClanceZ
is working on a reply...