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

.NET MAUI Blazor Hybrid - cannot resolve clr-namespace for Components.Routes

$
0
0

Created a new.net8.0 MAUI Blazor Hybrid App (New solution). Built solution and got the error:

XFC0000 Cannot resolve type "clr-namespace:MauiApp1:Components.Routes"

Code is all stock but here it is.

MainPage.xaml

<?xml version="1.0" encoding="utf-8" ?><ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"             xmlns:local="clr-namespace:MauiApp1"             x:Class="MauiApp1.MainPage"             BackgroundColor="{DynamicResource PageBackgroundColor}"><BlazorWebView x:Name="blazorWebView" HostPage="wwwroot/index.html"><BlazorWebView.RootComponents><RootComponent Selector="#app" ComponentType="{x:Type local:Components.Routes}" /></BlazorWebView.RootComponents></BlazorWebView></ContentPage>

Routes.Razor

<Router AppAssembly="@typeof(MauiProgram).Assembly"><Found Context="routeData"><RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" /><FocusOnNavigate RouteData="@routeData" Selector="h1" /></Found></Router>

Anyone have any idea what's going on?


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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