MackinnonBuck/MauiBlazorPermissionsExample

Error compiling for iOS

Closed this issue · 1 comments

I am getting compiler error when compiling for iOS.
Works fine for android.

image

Found it.
after inspecting your sample project i found out that you have the following line in .csproj file

<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-android')) != true">
		<Compile Remove="**\**\*.Android.cs" />
		<None Include="**\**\*.Android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
	</ItemGroup>

	<ItemGroup Condition="$(TargetFramework.StartsWith('net6.0-ios')) != true AND $(TargetFramework.StartsWith('net6.0-maccatalyst')) != true">
		<Compile Remove="**\**\*.iOS.cs" />
		<None Include="**\**\*.iOS.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
	</ItemGroup>

	<ItemGroup Condition="$(TargetFramework.Contains('-windows')) != true ">
		<Compile Remove="**\*.Windows.cs" />
		<None Include="**\*.Windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
	</ItemGroup>

after adding those lines to my project it is working fine now.