Windows Phone In App Purchasing - Cannot convert TValue to ProductListing

I am developing a Windows Phone 8 app with in-app purchase capability. In order to retrieve my products I do this:

ListingInformation listing = await CurrentApp.LoadListingInformationAsync();
foreach (var productListing in listing.ProductListings.Values)
{
    ...
}

where listing.ProductListings’s type is as shown below

However, when I try to replace var with ProductListing, I get the following error

if I leave it as ‘var’, the compiler doesn’t interpret it as ‘ProductListing’, rather the var ends up being of type ‘TValue’ which I don’t know what that is, and it has only 4 fields available for access (Equals,GetHashCode,GetType,ToString).

So I am unable to access my product information. Any ideas how to fix this?

You can always try

listing.ProductListings.ToList() and then iterate through that. I think the problem here (most likely) is that you can’t iterate through the collection of values like you attempted. The other thing you could try is to foreach through the keys and refer to the actual values like this

foreach(var key in listing.ProductListings.Keys){
  var productListing = listing.ProductListings[key]
}

Thanks for the response. The issue turned out to be a weird Resharper bug that went away when I upgraded from version 7 to 8.