question

philciraolo-4285 avatar image
1 Vote"
philciraolo-4285 asked JamesMontemagno-7652 commented

Microsoft.maui.Essentials

I'm uisng VS 2022 17.2.0 preview 3.0 with the standard MAUI template. If I add "using Microsoft.Maui.Essentials;" I get the error: Error CS0234 The type or namespace name 'Essentials' does not exist in the namespace 'Microsoft.Maui' (are you missing an assembly reference?) I was my undertsanging Microsoft.Maui.Essentials is now part of Maui yet I get this error.

dotnet-maui
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Would the issue occurs in a new project?

You can try to clean your obj and bin floder and update you nuget package. We will wait for your feedback.

0 Votes 0 ·

New project, I cleaned then rebuilbuit and still have issue. Essentials dosn't even show in the intellisense list

0 Votes 0 ·

Checkout https://github.com/dotnet/maui/wiki/Migrating-to-RC1 for information on the new namespaces

0 Votes 0 ·

1 Answer

RobCaplan avatar image
0 Votes"
RobCaplan answered

The Essentials classes are part of MAUI, but not under that name.

RC1 changed the namespaces so that they are focused on specific functionality rather than bundling everything together in a monolithic "Essentials" namespace.

The new namespaces are documented in the Migrating to RC1 page.

--Rob

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.