For anyone landing here and want to use latest Xamarin Essentials on their project just use the tag 'UseMauiEssentials' not 'UsingMauiEssentials'
<UseMauiEssentials>true</UseMauiEssentials>
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have started to port my existing Xamarin.Android and Xamarin.iOS applications to .Net Android and .Net iOS.
According to this post https://devblogs.microsoft.com/xamarin/xamarin-essentials-1-7-and-introducing-net-maui-essentials/#comment-1040
by adding the <UsingMauiEssentials>true</UsingMauiEssentials> on the csproj file I should be able to write sth like 'using Microsoft.Maui.Media;'
without any issues. However, even by changing the csproj file, I am not able to so.
Kindly note that I have created a brand new .Net Android app from Visual Studio 2022 template and that on the .Net MAUI template works just fine.
I am using Visual Studio Version 17.3.4.
Thanks very much.
p.s: That's the csproj file I am using
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0-android</TargetFramework>
<SupportedOSPlatformVersion>28.0</SupportedOSPlatformVersion>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<ApplicationId>com.companyname.Integrated.TestApp.Android</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<UsingMauiEssentials>true</UsingMauiEssentials>
</PropertyGroup>
</Project>
For anyone landing here and want to use latest Xamarin Essentials on their project just use the tag 'UseMauiEssentials' not 'UsingMauiEssentials'
<UseMauiEssentials>true</UseMauiEssentials>