Added .NET 8 support

This commit is contained in:
ClemensFischer 2023-11-23 16:06:25 +01:00
parent b5c177b563
commit fa4841d6ca
16 changed files with 47 additions and 60 deletions

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>MapControl.Caching</RootNamespace> <RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control FileDbCache Library for WPF</AssemblyTitle> <AssemblyTitle>XAML Map Control FileDbCache Library for WPF</AssemblyTitle>
@ -24,13 +24,15 @@
<Compile Include="..\Shared\*.cs" /> <Compile Include="..\Shared\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'"> <ItemGroup Condition="'$(TargetFramework)'=='net8.0-windows' or '$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'">
<PackageReference Include="System.Runtime.Caching" Version="7.0.0" /> <PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
<PackageReference Include="FileDb.Standard" Version="7.4.4" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'"> <ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'">
<Reference Include="System.Runtime.Caching" /> <Reference Include="System.Runtime.Caching" />
<PackageReference Include="FileDb.NET" Version="7.4.3" /> </ItemGroup>
<ItemGroup>
<PackageReference Include="FileDb.Standard" Version="7.4.4" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl.Caching</RootNamespace> <RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control FileDbCache Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control FileDbCache Library for WinUI</AssemblyTitle>
@ -27,8 +28,8 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="FileDb.Standard" Version="7.4.4" /> <PackageReference Include="FileDb.Standard" Version="7.4.4" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -22,16 +22,6 @@ namespace MapControl.MBTiles
nameof(File), typeof(string), typeof(MBTileLayer), nameof(File), typeof(string), typeof(MBTileLayer),
new PropertyMetadata(null, async (o, e) => await ((MBTileLayer)o).FilePropertyChanged((string)e.NewValue))); new PropertyMetadata(null, async (o, e) => await ((MBTileLayer)o).FilePropertyChanged((string)e.NewValue)));
public MBTileLayer()
: this(new TileImageLoader())
{
}
public MBTileLayer(ITileImageLoader tileImageLoader)
: base(tileImageLoader)
{
}
public string File public string File
{ {
get => (string)GetValue(FileProperty); get => (string)GetValue(FileProperty);

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl.MBTiles</RootNamespace> <RootNamespace>MapControl.MBTiles</RootNamespace>
<AssemblyTitle>XAML Map Control MBTiles Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control MBTiles Library for WinUI</AssemblyTitle>
@ -26,8 +27,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" /> <PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
</ItemGroup> </ItemGroup>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>MapControl</RootNamespace> <RootNamespace>MapControl</RootNamespace>
<AssemblyTitle>XAML Map Control Library for WPF</AssemblyTitle> <AssemblyTitle>XAML Map Control Library for WPF</AssemblyTitle>
@ -24,8 +24,8 @@
<Compile Include="..\Shared\*.cs" /> <Compile Include="..\Shared\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'"> <ItemGroup Condition="'$(TargetFramework)'=='net8.0-windows' or '$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'">
<PackageReference Include="System.Runtime.Caching" Version="7.0.0" /> <PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'"> <ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'">

View file

@ -21,18 +21,6 @@ namespace MapControl
{ {
public static partial class ImageLoader public static partial class ImageLoader
{ {
#if false
public static async Task<SoftwareBitmapSource> LoadImageAsync(BitmapDecoder decoder)
{
var image = new SoftwareBitmapSource();
var bitmap = await decoder.GetSoftwareBitmapAsync(
BitmapPixelFormat.Bgra8, BitmapAlphaMode.Premultiplied, new BitmapTransform(),
ExifOrientationMode.IgnoreExifOrientation, ColorManagementMode.DoNotColorManage);
await image.SetBitmapAsync(bitmap);
return image;
}
#else
public static async Task<WriteableBitmap> LoadImageAsync(BitmapDecoder decoder) public static async Task<WriteableBitmap> LoadImageAsync(BitmapDecoder decoder)
{ {
var image = new WriteableBitmap((int)decoder.PixelWidth, (int)decoder.PixelHeight); var image = new WriteableBitmap((int)decoder.PixelWidth, (int)decoder.PixelHeight);
@ -43,7 +31,7 @@ namespace MapControl
pixelData.DetachPixelData().CopyTo(image.PixelBuffer); pixelData.DetachPixelData().CopyTo(image.PixelBuffer);
return image; return image;
} }
#endif
public static async Task<ImageSource> LoadImageAsync(IRandomAccessStream stream) public static async Task<ImageSource> LoadImageAsync(IRandomAccessStream stream)
{ {
// WinUI BitmapImage produces visual artifacts with Bing Maps Aerial (or all JPEG?) // WinUI BitmapImage produces visual artifacts with Bing Maps Aerial (or all JPEG?)

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl</RootNamespace> <RootNamespace>MapControl</RootNamespace>
<AssemblyTitle>XAML Map Control Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control Library for WinUI</AssemblyTitle>
@ -26,7 +27,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>MapControl.Projections</RootNamespace> <RootNamespace>MapControl.Projections</RootNamespace>
<AssemblyTitle>XAML Map Control Projections Library for WPF</AssemblyTitle> <AssemblyTitle>XAML Map Control Projections Library for WPF</AssemblyTitle>

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl.Projections</RootNamespace> <RootNamespace>MapControl.Projections</RootNamespace>
<AssemblyTitle>XAML Map Control Projections Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control Projections Library for WinUI</AssemblyTitle>
@ -26,8 +27,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="ProjNET4GeoAPI" Version="1.4.1" /> <PackageReference Include="ProjNET4GeoAPI" Version="1.4.1" />
</ItemGroup> </ItemGroup>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>MapControl.UiTools</RootNamespace> <RootNamespace>MapControl.UiTools</RootNamespace>
<AssemblyTitle>XAML Map Control UI Tools Library for WPF</AssemblyTitle> <AssemblyTitle>XAML Map Control UI Tools Library for WPF</AssemblyTitle>

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl.UiTools</RootNamespace> <RootNamespace>MapControl.UiTools</RootNamespace>
<AssemblyTitle>XAML Map Control UI Tools Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control UI Tools Library for WinUI</AssemblyTitle>
@ -24,8 +25,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View file

@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks> <TargetFrameworks>net8.0-windows;net7.0-windows;net6.0-windows;net48;net462</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>MapControl.Caching</RootNamespace> <RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control SQLiteCache Library for WPF</AssemblyTitle> <AssemblyTitle>XAML Map Control SQLiteCache Library for WPF</AssemblyTitle>
@ -24,8 +24,8 @@
<Compile Include="..\Shared\*.cs" /> <Compile Include="..\Shared\*.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'"> <ItemGroup Condition="'$(TargetFramework)'=='net8.0-windows' or '$(TargetFramework)'=='net7.0-windows' or '$(TargetFramework)'=='net6.0-windows'">
<PackageReference Include="System.Runtime.Caching" Version="7.0.0" /> <PackageReference Include="System.Runtime.Caching" Version="8.0.0" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'"> <ItemGroup Condition="'$(TargetFramework)'=='net48' or '$(TargetFramework)'=='net462'">

View file

@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks> <TargetFrameworks>net8.0-windows10.0.17763.0;net7.0-windows10.0.17763.0;net6.0-windows10.0.17763.0</TargetFrameworks>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<RootNamespace>MapControl.Caching</RootNamespace> <RootNamespace>MapControl.Caching</RootNamespace>
<AssemblyTitle>XAML Map Control SQLiteCache Library for WinUI</AssemblyTitle> <AssemblyTitle>XAML Map Control SQLiteCache Library for WinUI</AssemblyTitle>
@ -26,8 +27,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" /> <PackageReference Include="System.Data.SQLite.Core" Version="1.0.118" />
</ItemGroup> </ItemGroup>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>ProjectionDemo</RootNamespace> <RootNamespace>ProjectionDemo</RootNamespace>
<AssemblyTitle>XAML Map Control Projection Demo Application</AssemblyTitle> <AssemblyTitle>XAML Map Control Projection Demo Application</AssemblyTitle>

View file

@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.17763.0</TargetFramework> <TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
<Platforms>x64</Platforms> <Platforms>x64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<PublishProfile>win10-$(Platform).pubxml</PublishProfile> <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseRidGraph>true</UseRidGraph>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<RootNamespace>SampleApplication</RootNamespace> <RootNamespace>SampleApplication</RootNamespace>
@ -35,8 +36,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.3.230724000" /> <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.4.231115000" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.756" /> <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.2428" />
<Manifest Include="$(ApplicationManifest)" /> <Manifest Include="$(ApplicationManifest)" />
</ItemGroup> </ItemGroup>

View file

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net7.0-windows;net48</TargetFrameworks> <TargetFrameworks>net8.0-windows;net48</TargetFrameworks>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<RootNamespace>SampleApplication</RootNamespace> <RootNamespace>SampleApplication</RootNamespace>
<AssemblyTitle>XAML Map Control WPF Sample Application</AssemblyTitle> <AssemblyTitle>XAML Map Control WPF Sample Application</AssemblyTitle>