diff --git a/src/Microsoft.Blazor/Components/RazorToolingWorkaround.cs b/src/Microsoft.Blazor/Components/RazorToolingWorkaround.cs index fd6207f0d5..3362111c62 100644 --- a/src/Microsoft.Blazor/Components/RazorToolingWorkaround.cs +++ b/src/Microsoft.Blazor/Components/RazorToolingWorkaround.cs @@ -14,6 +14,7 @@ */ using System; +using System.Threading.Tasks; namespace Microsoft.AspNetCore.Mvc { @@ -23,7 +24,13 @@ namespace Microsoft.AspNetCore.Mvc namespace Microsoft.AspNetCore.Mvc.Razor { - public class RazorPage { } + public class RazorPage { + + // This needs to be defined otherwise the VS tooling complains that there's no ExecuteAsync method to override. + public virtual Task ExecuteAsync() + => throw new NotImplementedException($"Blazor components do not implement {nameof(ExecuteAsync)}."); + + } namespace Internal {