這個錯誤突然進入我的專案并阻止我構建它。Erp 是專案的名稱。
我在其他機器上構建相同的專案沒有問題,我看不出有任何區別。
Nuget 軟體包均已正確安裝。
MainPage.xaml 的第 10 行報錯:
<?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:Erp"
x:Class="Erp.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">
<BlazorWebView HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
</BlazorWebView.RootComponents>
</BlazorWebView>
</ContentPage>
Main.razor 看起來也不錯:
<Router AppAssembly="@typeof(Main).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
uj5u.com熱心網友回復:
終于發現了一個錯誤,我在 div 中單獨留下了一個 @ 字符,這導致了錯誤 XFC0000:
<div class="Errs">
<i class="fa-solid fa-triangle-exclamation"></i>
@
</div>
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/515957.html
標籤:xml毛伊布雷泽
