Targetting xaml for multi platform

Manickam, Suraj 320 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">
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,578 questions
{count} votes

Your answer

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