“No suitable method found to override” error in Blazor/Razor pages

A screenshot of a series of errors in a Blazor application stating "No suitable method found to override"

I’ve run into an issue several times recently while working in Blazor where I’ll innocently try and run the application after some minor changes, only to be hit by a wall of errors seemingly out of nowhere:

ExamplePage.razor.cs(7, 29): [CS0115] 'ExamplePage.OnInitializedAsync()': no suitable method found to override
ExamplePage.razor.cs(12, 29): [CS0115] 'ExamplePage.OnAfterRenderAsync(bool)': no suitable method found to override
ExamplePage.razor.cs(17, 29): [CS0115] 'ExamplePage.OnParametersSetAsync()': no suitable method found to override
ExamplePage.razor.cs(22, 26): [CS0115] 'ExamplePage.SetParametersAsync(ParameterView)': no suitable method found to override

All of a sudden every single Razor component lifecycle function throughout the application is exploding and I’m left wondering how I managed to break things so spectacularly.

My approach to fixing this historically was:

  1. Take a look at my local changes in Git
  2. Try to tweak things to get it working again
  3. Fail
  4. Roll back everything and re-implement the change

It was frustrating and had wasted enough of my time over the past few months that I decided that I was going to figure it out once and for all, by gum.

Note: If you’re in a hurry the fix is quick and simple, so feel free to jump straight down to that section to skip my self-indulgent waffling.

Continue reading ““No suitable method found to override” error in Blazor/Razor pages”

High Potentials Programme 2022 or: How I Learned to Stop Worrying and Love Project Management

A certificate that says "This certificate is awarded to Matthew Champion for the successful completion of the High Potentials Programme July 5th 2022", with logos and signatures from Avado and Blenheim Chalcot

Two days ago I graduated as part of the 2022 cohort of the High Potentials Programme, a 12 week leadership course delivered by Blenheim Chalcot and Avado Learning that looked at change/project management, leading teams and creating commercial value. Fancy.

A certificate that says "This certificate is awarded to Matthew Champion for the successful completion of the High Potentials Programme July 5th 2022", with logos and signatures from Avado and Blenheim Chalcot
I got a (digital) certificate and everything!
Continue reading “High Potentials Programme 2022 or: How I Learned to Stop Worrying and Love Project Management”

The Power Of Naivety

A red heart shape that has been sewn onto a white piece of fabric

For Valentine’s Day this year, I wanted to go a bit fancier than my usual shop-bought present, deciding instead that I would handmake a cushion and embroider our names on the front. My grandma taught me to sew many years ago and even though I’d not really used those skills much in the intervening time, I figured that it shouldn’t be too difficult.

Oh how naive of me.

If I’m going to be honest, my original plans were probably about as detailed as:

  1. Buy cushion
  2. Embroider names on the front
  3. Success

As you might imagine, this wasn’t really sufficient planning on my part. By the time I was finished, my original plans had ballooned out to a frankly ridiculous number of individual points that I hadn’t even realised would be relevant at the start. As well as that, I began a couple of weeks before Valentine’s Day, worked on it whenever I had any spare time and still only finished it late in the evening the day before. In all, it probably took me about 15-20 hours of work to go from an initial idea to a finished project (what can I say, I’m apparently incredibly slow at sewing).

Continue reading “The Power Of Naivety”