Targetting xaml for multi platform

Manickam, Suraj 365 Reputation points
2024-07-01T11:57:57.6166667+00:00

I have a xaml that includes android specific library as assembly and it needs to compiled only for android target platforms. I tried by putting it in platforms folder but it did not work . My assembly inclusion is present in xaml itself like the below code , The following inclusion should compile only for android and i get an error that type or name space could not be found in the global namespace for other platforms other than android

YAMLCopy

 xmlns:dataView="clr-namespace:DataView.DataCapture.Core.UI.Maui;assembly=DataCaptureCoreMaui"

XMLCopy

<?xml version="1.0" encoding="utf-8" ?>
xmlns:dataView="clrnamespace:DataView.DataCapture.Core.UI.Maui;assembly=DataCaptureCoreMaui">
Developer technologies | .NET | .NET MAUI
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.