Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

MyRazorPage.BuildRenderTree(RenderTreeBuilder): no suitable method found to override (CS0115)

$
0
0

I am creating a razor page (.NET 6) for users to checkout, but when I try to have my razor page inherit from my base C# class, I get the error -(CS0115) MyRazorPage.BuildRenderTree(RenderTreeBuilder): no suitable method found to override

I am not sure what is going on since I have not overloaded any methods yet. I did recently rename of of my projects so I am wondering if it is possibly a problem with my csproj file.

Any help is appreciated.

Razor Page:

@inherits CheckoutBase<h3>Checkout</h3>@code {}

Base Class:

namespace MyBlazorProject.Pages{    public class CheckoutBase    {    }}

csproj file:

<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"><PropertyGroup><TargetFramework>net6.0</TargetFramework><Nullable>enable</Nullable><ImplicitUsings>enable</ImplicitUsings></PropertyGroup><ItemGroup><PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.16" /><PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.16" PrivateAssets="all" /><PackageReference Include="Newtonsoft.Json" Version="13.0.3" /></ItemGroup><ItemGroup><ProjectReference Include="..\MyBlazorProject.Models\MyBlazorProject.Models.csproj" /></ItemGroup></Project>

Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>