diff --git a/FileDbCache/WinUI/FileDbCache.WinUI.csproj b/FileDbCache/WinUI/FileDbCache.WinUI.csproj
index 6a9b1f0e..4ac85702 100644
--- a/FileDbCache/WinUI/FileDbCache.WinUI.csproj
+++ b/FileDbCache/WinUI/FileDbCache.WinUI.csproj
@@ -27,8 +27,8 @@
-
-
+
+
diff --git a/MBTiles/UWP/MBTiles.UWP.csproj b/MBTiles/UWP/MBTiles.UWP.csproj
index 7be1c95f..cf23e721 100644
--- a/MBTiles/UWP/MBTiles.UWP.csproj
+++ b/MBTiles/UWP/MBTiles.UWP.csproj
@@ -57,7 +57,7 @@
6.2.14
- 1.0.117
+ 1.0.118
diff --git a/MBTiles/WPF/MBTiles.WPF.csproj b/MBTiles/WPF/MBTiles.WPF.csproj
index 8518201e..0f14a367 100644
--- a/MBTiles/WPF/MBTiles.WPF.csproj
+++ b/MBTiles/WPF/MBTiles.WPF.csproj
@@ -25,7 +25,7 @@
-
+
diff --git a/MBTiles/WinUI/MBTiles.WinUI.csproj b/MBTiles/WinUI/MBTiles.WinUI.csproj
index 3478a970..fc054ce3 100644
--- a/MBTiles/WinUI/MBTiles.WinUI.csproj
+++ b/MBTiles/WinUI/MBTiles.WinUI.csproj
@@ -26,9 +26,9 @@
-
-
-
+
+
+
diff --git a/MapControl/Shared/ImageLoader.cs b/MapControl/Shared/ImageLoader.cs
index a2c36e80..a6574ca8 100644
--- a/MapControl/Shared/ImageLoader.cs
+++ b/MapControl/Shared/ImageLoader.cs
@@ -94,7 +94,16 @@ namespace MapControl
if (!responseMessage.Headers.TryGetValues("X-VE-Tile-Info", out IEnumerable tileInfo) ||
!tileInfo.Contains("no-tile"))
{
- buffer = await ReadAsByteArrayAsync(responseMessage.Content, progress).ConfigureAwait(false);
+ var content = responseMessage.Content;
+
+ if (progress != null && content.Headers.ContentLength.HasValue)
+ {
+ buffer = await ReadAsByteArrayAsync(content, progress).ConfigureAwait(false);
+ }
+ else
+ {
+ buffer = await content.ReadAsByteArrayAsync().ConfigureAwait(false);
+ }
}
response = new HttpResponse(buffer, responseMessage.Headers.CacheControl?.MaxAge);
@@ -115,11 +124,6 @@ namespace MapControl
private static async Task ReadAsByteArrayAsync(HttpContent content, IProgress progress)
{
- if (progress == null || !content.Headers.ContentLength.HasValue)
- {
- return await content.ReadAsByteArrayAsync().ConfigureAwait(false);
- }
-
var length = (int)content.Headers.ContentLength.Value;
var buffer = new byte[length];
diff --git a/MapControl/WinUI/MapControl.WinUI.csproj b/MapControl/WinUI/MapControl.WinUI.csproj
index c89739e7..1a407e87 100644
--- a/MapControl/WinUI/MapControl.WinUI.csproj
+++ b/MapControl/WinUI/MapControl.WinUI.csproj
@@ -26,7 +26,7 @@
-
-
+
+
diff --git a/MapProjections/WinUI/MapProjections.WinUI.csproj b/MapProjections/WinUI/MapProjections.WinUI.csproj
index 86e8ec5c..cdd05e2c 100644
--- a/MapProjections/WinUI/MapProjections.WinUI.csproj
+++ b/MapProjections/WinUI/MapProjections.WinUI.csproj
@@ -26,8 +26,8 @@
-
-
+
+
diff --git a/MapUiTools/WinUI/MapUiTools.WinUI.csproj b/MapUiTools/WinUI/MapUiTools.WinUI.csproj
index a7adccd3..5307a28f 100644
--- a/MapUiTools/WinUI/MapUiTools.WinUI.csproj
+++ b/MapUiTools/WinUI/MapUiTools.WinUI.csproj
@@ -24,8 +24,8 @@
-
-
+
+
diff --git a/SQLiteCache/UWP/SQLiteCache.UWP.csproj b/SQLiteCache/UWP/SQLiteCache.UWP.csproj
index 01cbed82..f8834207 100644
--- a/SQLiteCache/UWP/SQLiteCache.UWP.csproj
+++ b/SQLiteCache/UWP/SQLiteCache.UWP.csproj
@@ -54,7 +54,7 @@
6.2.14
- 1.0.117
+ 1.0.118
diff --git a/SQLiteCache/WPF/SQLiteCache.WPF.csproj b/SQLiteCache/WPF/SQLiteCache.WPF.csproj
index dba59621..66255ff0 100644
--- a/SQLiteCache/WPF/SQLiteCache.WPF.csproj
+++ b/SQLiteCache/WPF/SQLiteCache.WPF.csproj
@@ -33,6 +33,6 @@
-
+
diff --git a/SQLiteCache/WinUI/SQLiteCache.WinUI.csproj b/SQLiteCache/WinUI/SQLiteCache.WinUI.csproj
index 3dd93964..9fcefd9e 100644
--- a/SQLiteCache/WinUI/SQLiteCache.WinUI.csproj
+++ b/SQLiteCache/WinUI/SQLiteCache.WinUI.csproj
@@ -26,9 +26,9 @@
-
-
-
+
+
+
diff --git a/SampleApps/WinUiApp/WinUiApp.csproj b/SampleApps/WinUiApp/WinUiApp.csproj
index 7b311059..7d7c6602 100644
--- a/SampleApps/WinUiApp/WinUiApp.csproj
+++ b/SampleApps/WinUiApp/WinUiApp.csproj
@@ -35,8 +35,8 @@
-
-
+
+