路径 'XXXXXXX\Shared\MainLayout.razor.css' 将导致应用程序包之外的文件并且无法使用
The error happens with Blazor MAUI Hybrid Project.
Project compile and runs without error for Android, Android Local device & windows emulator platform and even works for iOS simulator,
but runs into compiler issues for iOS Local Device
Create Blazor MAUI hybrid App
Change to iOS local Device
It will start showing .css related Error
这个问题最近在为本地 iOS 硬件目标构建时浮出水面。除了删除/删除未引用的 razor 文件之外,还需要明确排除以下 json 文件。是的,launchSettings.json与位于 Android 平台层次结构中的google-services.json文件一样被引用。
<ItemGroup Condition="$(TargetFramework.EndsWith('-ios'))"> <None Remove="Properties\launchSettings.json" /> <None Remove="Platforms\Android\google-services.json" /> <Content Remove="Properties\launchSettings.json" /> <Content Remove="Platforms\Android\google-services.json" /> </ItemGroup>
https://github.com/dotnet/maui/issues/4061#issue-1099499420