Problem with Geocoding

Daniel Manchester 86 Reputation points
2022-11-23T16:56:38.697+00:00

I am using VS 2022 ver 17.4.1 and deploying my Maui app to my physical device I am getting System.NullReferenceException
Message=Object reference not set to an instance of an object

using the following code

string address = "Microsoft Building 25 Redmond WA USA";
var m = await Geocoding.Default.GetLocationsAsync(address);

Thanks for your help

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
4,149 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.