The type or namespace name 'MauiVideoPlayer' could not be found (are you missing a using directive or an assembly reference?)
Closed this issue · 1 comments
So I'm having an issue with my project that I'm not sure how to solve. (I'm new to .net Maui)
I ported the code into my project, but I'm getting this error on my VideoHandler.MaciOS file:
The type or namespace name 'MauiVideoPlayer' could not be found (are you missing a using directive or an assembly reference?)
I'm missing something from your project, but I can't figure out what it is.
I added the following to my project file and it seems to work for all but the MaciOS files.
On your project it seems to default to "net7.0-maccatalyst", but on mine it defaults to "net7.0-iOS" for the VideoHandler.MaciOS.cs file, which is why I'm getting the error I think.
<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-android')) != true">
<Compile Remove="**\**\*.Android.cs" />
<None Include="**\**\*.Android.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net7.0-ios')) != true AND $(TargetFramework.StartsWith('net7.0-maccatalyst')) != true">
<Compile Remove="**\**\*.MaciOS.cs" />
<None Include="**\**\*.MaciOS.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.Contains('-windows')) != true ">
<Compile Remove="**\*.Windows.cs" />
<None Include="**\*.Windows.cs" Exclude="$(DefaultItemExcludes);$(DefaultExcludesInProjectFolder)" />
</ItemGroup>
I went through and double checked all my namespaces and I think I got one wrong.