danroth27 / Net8BlazorWebAssembly

ASP.NET Core hosted Blazor WebAssembly app with .NET 8
MIT License
31 stars 9 forks source link

'HeadOutlet' does not have a property matching the name '@rendermode' #3

Closed Webreaper closed 1 year ago

Webreaper commented 1 year ago

Sorry for the issue spam, but really want to get this working. 😁

Changes complete now, but when I run I get:

An unhandled exception occurred while processing the request.
InvalidOperationException: Object of type 'Microsoft.AspNetCore.Components.Web.HeadOutlet' does not have a property matching the name '@rendermode'.
Microsoft.AspNetCore.Components.Reflection.ComponentProperties.ThrowForUnknownIncomingParameterName(Type targetType, string parameterName)

Any clues on this one?

Webreaper commented 1 year ago

Ah, interesting - might want to add this to the readme. Adding this to the Client csproj file

    <RazorLangVersion>8.0</RazorLangVersion>

seems to have fixed it! I see you committed that here: https://github.com/danroth27/Net8BlazorWebAssembly/commit/5cbc310b6bccf462839226278aa43c6c3c336953

danroth27 commented 1 year ago

Ah, interesting - might want to add this to the readme. Adding this to the Client csproj file

    <RazorLangVersion>8.0</RazorLangVersion>

seems to have fixed it! I see you committed that here: 5cbc310

Yeah, this is a temporary issue that has been fixed for the upcoming .NET 8 release so I didn't include it in the readme: https://github.com/dotnet/aspnetcore/issues/49167. Note that there are still other issues with the WebAssembly render mode that we're working on resolving like https://github.com/dotnet/aspnetcore/issues/49313.