dknoodle / WUnderground.Net

WUnderground .Net Library (Also Weather.com)
MIT License
19 stars 13 forks source link

"Freeze" when using GetForecastAsync with MVVM Light #10

Closed bdollerup closed 7 years ago

bdollerup commented 7 years ago

Hi there,

I've been converting one of my personal projects to use MVVM Light (VS2017 and Windows Template Studio) and when I use the await-able version of the above call, the app "locks up

This works with the MVVM template:

double _lat = 55.680495;
double _lon = 12.259956;

var _WeatherforeCast = _weatherClient.GetForecast(QueryType.GPS, new QueryOptions() { Language = "DK", Latitude = _lat.ToString(), Longitude = _lon.ToString() });

This doesn't work with the MVVM template (but works with my "normal" code-behind project)

double _lat = 55.680495;
double _lon = 12.259956;

var _WeatherforeCast = await _weatherClient.GetForecastAsync(QueryType.GPS, new QueryOptions() { Language = "DK", Latitude = _lat.ToString(), Longitude = _lon.ToString() });

Any ideas as to what I need to look for? Thanks, Bjarne

bdollerup commented 7 years ago

By the way, I can see that the project that doesn't work with your API is set up Windows Min/max version 15063. I wonder if that'll help?

Bjarne