From 35941bbf6818bce667625a4dfcc34cc54eb6788c Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 20 Apr 2022 03:19:32 +0800 Subject: [PATCH] Building using .NET MAUI RC 2 (#2004) --- VERSIONS.txt | 2 +- nuget/SkiaSharp.Views.WinUI.nuspec | 11 +- .../SkiaSharpSample/SkiaSharpSample.csproj | 2 +- samples/Basic/WinUI/Msix/SkiaSharpSample.sln | 61 ++- .../SkiaSharpSample/SkiaSharpSample.csproj | 3 +- .../SkiaSharpSample.Package.wapproj | 2 +- .../SkiaSharpSample/SkiaSharpSample.csproj | 2 +- scripts/azure-pipelines-tests.yml | 5 - scripts/azure-pipelines-variables.yml | 4 +- scripts/install-dotnet-workloads.ps1 | 7 +- source/SkiaSharp.Build.WinUI.NetCore.targets | 481 ++++++++++++++++++ source/SkiaSharp.Build.targets | 2 + ...p.Views.Maui.Controls.Compatibility.csproj | 3 + .../SkiaSharp.Views.Maui.Controls.csproj | 3 + .../SKImageSourceService.Android.cs | 24 +- .../SkiaSharp.Views.Maui.Core.csproj | 3 + .../SkiaSharp.Views.WinUI.csproj | 7 +- 17 files changed, 574 insertions(+), 48 deletions(-) create mode 100644 source/SkiaSharp.Build.WinUI.NetCore.targets diff --git a/VERSIONS.txt b/VERSIONS.txt index 5fb1b34f..c93bed13 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -22,7 +22,7 @@ System.IO.UnmanagedMemoryStream release 4.3.0 System.Drawing.Common release 4.5.1 SharpVk release 0.4.2 Uno.UI release 4.0.8 -Microsoft.WindowsAppSDK release 1.0.0 +Microsoft.WindowsAppSDK release 1.0.2 Microsoft.Maui.Graphics release 6.0.200-preview.12.852 Microsoft.Windows.SDK.NET.Ref release 10.0.18362.22 Microsoft.AspNetCore.Components.Web release 6.0.0 diff --git a/nuget/SkiaSharp.Views.WinUI.nuspec b/nuget/SkiaSharp.Views.WinUI.nuspec index 84c3654d..8379f03e 100644 --- a/nuget/SkiaSharp.Views.WinUI.nuspec +++ b/nuget/SkiaSharp.Views.WinUI.nuspec @@ -29,11 +29,15 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release - + - + + + + + @@ -47,6 +51,9 @@ Please visit https://go.microsoft.com/fwlink/?linkid=868517 to view the release + + + diff --git a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj index eb95a62a..42b7d0c6 100644 --- a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj @@ -2,7 +2,7 @@ net6.0-ios;net6.0-maccatalyst;net6.0-android - $(TargetFrameworks);net6.0-windows10.0.19041.0 + $(TargetFrameworks);net6.0-windows10.0.19041.0 Exe true true diff --git a/samples/Basic/WinUI/Msix/SkiaSharpSample.sln b/samples/Basic/WinUI/Msix/SkiaSharpSample.sln index 1768be4c..12bc996c 100644 --- a/samples/Basic/WinUI/Msix/SkiaSharpSample.sln +++ b/samples/Basic/WinUI/Msix/SkiaSharpSample.sln @@ -12,25 +12,74 @@ EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|arm64 = Debug|arm64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|arm64 = Release|arm64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.Build.0 = Debug|Any CPU - {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {71668276-ECDD-49EC-9406-27A9D2676139}.Release|Any CPU.ActiveCfg = Release|Any CPU - {71668276-ECDD-49EC-9406-27A9D2676139}.Release|Any CPU.Build.0 = Release|Any CPU - {71668276-ECDD-49EC-9406-27A9D2676139}.Release|Any CPU.Deploy.0 = Release|Any CPU + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.ActiveCfg = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.Build.0 = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|Any CPU.Deploy.0 = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|arm64.ActiveCfg = Debug|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|arm64.Build.0 = Debug|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|arm64.Deploy.0 = Debug|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x64.ActiveCfg = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x64.Build.0 = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x64.Deploy.0 = Debug|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x86.ActiveCfg = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x86.Build.0 = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Debug|x86.Deploy.0 = Debug|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|Any CPU.ActiveCfg = Release|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|arm64.ActiveCfg = Release|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|arm64.Build.0 = Release|arm64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x64.ActiveCfg = Release|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x64.Build.0 = Release|x64 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x86.ActiveCfg = Release|x86 + {71668276-ECDD-49EC-9406-27A9D2676139}.Release|x86.Build.0 = Release|x86 {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|arm64.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|arm64.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x64.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x64.Build.0 = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x86.ActiveCfg = Debug|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Debug|x86.Build.0 = Debug|Any CPU {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|Any CPU.ActiveCfg = Release|Any CPU {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|Any CPU.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|arm64.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|arm64.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x64.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x64.Build.0 = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x86.ActiveCfg = Release|Any CPU + {EA2AC287-6FEF-415D-BD33-01287DD11574}.Release|x86.Build.0 = Release|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.Build.0 = Debug|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|arm64.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x64.Deploy.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.ActiveCfg = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.Build.0 = Debug|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Debug|x86.Deploy.0 = Debug|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.ActiveCfg = Release|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.Build.0 = Release|Any CPU {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|Any CPU.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|arm64.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x64.Deploy.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.ActiveCfg = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.Build.0 = Release|Any CPU + {B9E319D8-0A0E-471C-BD01-8015655FBD99}.Release|x86.Deploy.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/Basic/WinUI/Msix/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/WinUI/Msix/SkiaSharpSample/SkiaSharpSample.csproj index 48a3e4f9..5e604464 100644 --- a/samples/Basic/WinUI/Msix/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/WinUI/Msix/SkiaSharpSample/SkiaSharpSample.csproj @@ -7,11 +7,12 @@ SkiaSharpSample app.manifest true + x86;x64;arm64 win10-x86;win10-x64;win10-arm64 - + diff --git a/samples/Basic/WinUI/WapProj/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj b/samples/Basic/WinUI/WapProj/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj index 043a2a87..71fb14bf 100644 --- a/samples/Basic/WinUI/WapProj/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj +++ b/samples/Basic/WinUI/WapProj/SkiaSharpSample.Package/SkiaSharpSample.Package.wapproj @@ -64,7 +64,7 @@ - + build diff --git a/samples/Basic/WinUI/WapProj/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/WinUI/WapProj/SkiaSharpSample/SkiaSharpSample.csproj index 1095b308..71b21bf0 100644 --- a/samples/Basic/WinUI/WapProj/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/WinUI/WapProj/SkiaSharpSample/SkiaSharpSample.csproj @@ -11,7 +11,7 @@ - + diff --git a/scripts/azure-pipelines-tests.yml b/scripts/azure-pipelines-tests.yml index 9a4db381..9042cf81 100644 --- a/scripts/azure-pipelines-tests.yml +++ b/scripts/azure-pipelines-tests.yml @@ -3,10 +3,6 @@ trigger: none pr: none parameters: - - name: buildExternals - displayName: 'The specific native artifacts to use for this build.' - type: number - default: 0 - name: VM_IMAGE_WINDOWS type: object default: @@ -45,7 +41,6 @@ stages: - template: azure-templates-stages.yml parameters: isBuildPipeline: false - buildExternals: ${{ parameters.buildExternals }} VM_IMAGE_WINDOWS: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_WINDOWS_NATIVE: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_MAC: ${{ parameters.VM_IMAGE_MAC }} diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 6901f767..e7742518 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -14,8 +14,8 @@ variables: MONO_VERSION_LINUX: '' XCODE_VERSION: 13.2.1 VISUAL_STUDIO_VERSION: '17/pre' - DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' - DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' + DOTNET_VERSION_PREVIEW: '6.0.300-preview.22207.16' + DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.2.json' CONFIGURATION: 'Release' DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true THROW_ON_TEST_FAILURE: true diff --git a/scripts/install-dotnet-workloads.ps1 b/scripts/install-dotnet-workloads.ps1 index 52195dd0..afd45ab7 100644 --- a/scripts/install-dotnet-workloads.ps1 +++ b/scripts/install-dotnet-workloads.ps1 @@ -11,8 +11,8 @@ $previewRuntime = 'https://api.nuget.org/v3/index.json' $previewEmscripten = 'https://api.nuget.org/v3/index.json' if ($IsPreview) { $previewFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json' - $previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-323bf2dd/nuget/v3/index.json' - $previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-572aeedc/nuget/v3/index.json' + $previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-bd261ea4/nuget/v3/index.json' + $previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-52e9452f-3/nuget/v3/index.json' } Write-Host "Installing workloads..." @@ -22,6 +22,7 @@ Write-Host "Installing workloads..." --source https://api.nuget.org/v3/index.json ` --source $previewFeed ` --source $previewRuntime ` - --source $previewEmscripten + --source $previewEmscripten ` + --skip-sign-check exit $LASTEXITCODE diff --git a/source/SkiaSharp.Build.WinUI.NetCore.targets b/source/SkiaSharp.Build.WinUI.NetCore.targets new file mode 100644 index 00000000..b4f8f27a --- /dev/null +++ b/source/SkiaSharp.Build.WinUI.NetCore.targets @@ -0,0 +1,481 @@ + + + + + + + $(TargetName) + + + + + <_LayoutFileSource Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'ContentFilesProjectOutputGroup' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'" /> + <_LayoutFileSource Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'CustomOutputGroupForPackaging' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'" /> + <_LayoutFile Include="@(_LayoutFileSource)" Exclude="@(_AppxLayoutAssetPackageFiles)" /> + <_EmbedFile Include="@(PriOutputs)" Condition="'%(PriOutputs.OutputGroup)' == 'EmbedOutputGroupForPackaging' and '%(PriOutputs.ProjectName)' == '$(ProjectName)'"/> + <_EmbedFileCopy Include="@(_EmbedFile->'$(IntermediateOutputPath)$(AppxSubfolderWithFilesToBeEmbedded)\%(TargetPath)')" /> + + + <_LayoutFileXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(_EmbedFile.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" /> + <_LayoutFile Remove="@(_LayoutFileXbfXaml)" /> + + + + + + + + + + + + + + + + + + + + + + + + + + true + true + true + true + + true + false + false + false + false + true + true + false + false + true + true + true + + + + + + + + <_PackagingOutputsUnexpanded Include="%(_BuiltProjectOutputGroupOutput.FinalOutputPath)"> + %(_BuiltProjectOutputGroupOutput.TargetPath) + BuiltProjectOutputGroup + $(ProjectName) + + + + + + <_PackagingOutputsUnexpanded Include="%(_BuiltProjectOutputGroupOutput.FinalOutputPath)" Condition="'%(Extension)'!='.dll'"> + %(_BuiltProjectOutputGroupOutput.TargetPath) + BuiltProjectOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_PublishItemsOutputGroupOutput)"> + PublishItemsOutputGroupOutput + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="%(_DebugSymbolsProjectOutputGroupOutput.FinalOutputPath)"> + DebugSymbolsProjectOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_DocumentationProjectOutputGroupOutput)"> + DocumentationProjectOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_SatelliteDllsProjectOutputGroupOutput)"> + SatelliteDllsProjectOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_SourceFilesProjectOutputGroupOutput)"> + SourceFilesProjectOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_SGenFilesOutputGroupOutput)"> + SGenFilesOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'!='.pri'"> + CopyLocalFilesOutputGroup + $(ProjectName) + + + + + + <_PackagingOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'!='.pri' and '%(Extension)'!='.dll'"> + CopyLocalFilesOutputGroup + $(ProjectName) + + + + + + + + + + + <_RedundantXaml Include="@(_GetCopyToOutputDirectoryItemsOutputGroupOutput->'%(RootDir)%(Directory)%(Filename).xaml')" + Condition="'%(Extension)'=='.xbf'" /> + <_GetCopyToOutputDirectoryItemsOutputGroupOutput Remove="@(_RedundantXaml)" /> + + <_PackagingOutputsUnexpanded Include="@(_GetCopyToOutputDirectoryItemsOutputGroupOutput)"> + GetCopyToOutputDirectoryItemsOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_ComFilesOutputGroupOutput)"> + ComFilesOutputGroup + $(ProjectName) + + + + + + + + + <_PackagingOutputsUnexpanded Include="@(_CopyWinmdArtifactsOutputGroupOutput)"> + CopyWinmdArtifactsOutputGroup + $(ProjectName) + + + + + + + + + + <_SDKRedistRedundantXBF Include="@(_SDKRedistOutputGroupOutput->'%(RootDir)%(Directory)%(Filename).xbf')" + Condition="'%(Extension)'=='.xaml'" /> + <_SDKRedistOutputGroupOutput Remove="@(_SDKRedistRedundantXBF)" /> + + + + <_PackagingOutputsUnexpanded Include="@(_SDKRedistOutputGroupOutput)"> + SDKRedistOutputGroup + $(ProjectName) + + <_PackagingOutputsUnexpanded Remove="@(RemoveSdkFilesFromAppxPackage)" /> + + + + <_PackagingOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(_CustomOutputGroupForPackagingOutput.ReferenceSourceTarget)' == 'ExpandSDKReference'"> + SDKRedistOutputGroup + $(ProjectName) + $(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath) + + <_CustomOutputGroupForPackagingOutput Remove="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(_CustomOutputGroupForPackagingOutput.ReferenceSourceTarget)' == 'ExpandSDKReference'"/> + + + + + + + + + + + + <_GetResolvedSDKReferencesOutput Include="@(_GetResolvedSDKReferencesOutputWithoutMetadata)"> + GetResolvedSDKReferences + $(ProjectName) + + + + + + + + + <_ProjectArchitectureItem Include="@(_ProjectArchitecture)"> + _GetProjectArchitecture + $(ProjectName) + + + + + <_ContinueOnError Condition="'$(BuildingProject)' == 'true'">false + <_ContinueOnError Condition="'$(BuildingProject)' != 'true'">true + + + + + + + + <_PackagingOutputsOutsideLayout Include="@(ProjectPriFile)" /> + <_PackagingOutputsOutsideLayout Include="@(_PackagingOutputsExpanded)" /> + <_PackagingOutputsOutsideLayout Include="@(PriOutputs)" /> + <_PackagingOutputsOutsideLayout Include="@(_GetResolvedSDKReferencesOutput)" /> + + <_PackagingOutputsOutsideLayout Include="@(_PackagingOutputsFromOtherProjects)" Exclude="@(PriOutputs)"/> + + + + + + + + + + + + + + + + + + + + $(ProjectName) + LayoutOutputGroup + + + + + + + + <_PackagingOutputsXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(PackagingOutputs.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" /> + + + + + + + + true + true + true + true + false + + + + + + + + + + + <_PriOutputsUnexpanded Include="@(_CopyLocalFilesOutputGroupOutput)" Condition="'%(Extension)'=='.pri'"> + CopyLocalFilesOutputGroup + $(ProjectName) + + + + + <_PriOutputsUnexpanded Include="@(_PriFilesOutputGroupOutput)"> + PriFilesOutputGroup + $(ProjectName) + + + + + + + + + <_PriOutputsUnexpanded Include="@(_ContentFilesProjectOutputGroupOutput)"> + ContentFilesProjectOutputGroup + $(ProjectName) + $(AppxPriInitialPath)\%(_ContentFilesProjectOutputGroupOutput.TargetPath) + + + + + + + + + <_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' != '.xbf'"> + CustomOutputGroupForPackaging + $(ProjectName) + $(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath) + + <_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' == '.xbf' AND '$(_SupportXbfAsEmbedFileResources)' != 'true'"> + CustomOutputGroupForPackaging + $(ProjectName) + $(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath) + + <_PriOutputsUnexpanded Include="@(_CustomOutputGroupForPackagingOutput)" Condition="'%(Extension)' == '.xbf' AND '$(_SupportXbfAsEmbedFileResources)' == 'true'"> + EmbedOutputGroupForPackaging + $(ProjectName) + $(AppxPriInitialPath)\%(_CustomOutputGroupForPackagingOutput.TargetPath) + + + + + + + + + + ProjectPriFile + $(ProjectName) + $(ProjectPriFileName) + + + + + + ProjectPriUploadFile + $(ProjectName) + $(ProjectPriFileName) + + + + + <_ContinueOnError Condition="'$(BuildingProject)' == 'true'">false + <_ContinueOnError Condition="'$(BuildingProject)' != 'true'">true + + + + + + + + + + + + + + <_PriOutputsXbfXaml Include="$([System.IO.Path]::ChangeExtension('%(PriOutputs.Identity)','.xaml'))" Condition="'%(Extension)' == '.xbf'" /> + + + + + + + + + diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets index 1301709c..0b54fc7e 100644 --- a/source/SkiaSharp.Build.targets +++ b/source/SkiaSharp.Build.targets @@ -262,4 +262,6 @@ internal partial class VersionConstants { + + diff --git a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls.Compatibility/SkiaSharp.Views.Maui.Controls.Compatibility.csproj b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls.Compatibility/SkiaSharp.Views.Maui.Controls.Compatibility.csproj index c902fb24..120d1702 100644 --- a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls.Compatibility/SkiaSharp.Views.Maui.Controls.Compatibility.csproj +++ b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls.Compatibility/SkiaSharp.Views.Maui.Controls.Compatibility.csproj @@ -11,6 +11,9 @@ net6.0-windows true false + true + None + false diff --git a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SkiaSharp.Views.Maui.Controls.csproj b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SkiaSharp.Views.Maui.Controls.csproj index 2ab44599..f764f3ca 100644 --- a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SkiaSharp.Views.Maui.Controls.csproj +++ b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Controls/SkiaSharp.Views.Maui.Controls.csproj @@ -11,6 +11,9 @@ net6.0-windows true false + true + None + false diff --git a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/Handlers/SKImageSourceService/SKImageSourceService.Android.cs b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/Handlers/SKImageSourceService/SKImageSourceService.Android.cs index 0be186c4..fb13a162 100644 --- a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/Handlers/SKImageSourceService/SKImageSourceService.Android.cs +++ b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/Handlers/SKImageSourceService/SKImageSourceService.Android.cs @@ -9,29 +9,7 @@ namespace SkiaSharp.Views.Maui.Handlers { public partial class SKImageSourceService { - public override async Task LoadDrawableAsync( - IImageSource imageSource, - global::Android.Widget.ImageView imageView, - CancellationToken cancellationToken = default) - { - var realResult = await GetDrawableAsync(imageView.Context!, imageSource, cancellationToken); - - if (realResult is null) - { - imageView.SetImageDrawable(null); - return null; - } - - imageView.SetImageDrawable(realResult.Value); - - var result = new ImageSourceServiceLoadResult( - realResult.IsResolutionDependent, - () => realResult.Dispose()); - - return result; - } - - public override Task?> GetDrawableAsync(Context context, IImageSource imageSource, CancellationToken cancellationToken = default) + public override Task?> GetDrawableAsync(IImageSource imageSource, Context context, CancellationToken cancellationToken = default) { var bitmap = imageSource switch { diff --git a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/SkiaSharp.Views.Maui.Core.csproj b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/SkiaSharp.Views.Maui.Core.csproj index 418abf5d..ee327139 100644 --- a/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/SkiaSharp.Views.Maui.Core.csproj +++ b/source/SkiaSharp.Views.Maui/SkiaSharp.Views.Maui.Core/SkiaSharp.Views.Maui.Core.csproj @@ -12,6 +12,9 @@ net6.0-windows true false + true + None + false diff --git a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj index e46a08ce..b868e4fa 100644 --- a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj +++ b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj @@ -1,13 +1,16 @@  - net5.0-windows10.0.18362;net6.0-windows10.0.18362 + net5.0-windows10.0.18362;net6.0-windows10.0.18362;net6.0-windows10.0.19041 10.0.17763.0 SkiaSharp.Views.Windows SkiaSharp.Views.Windows SkiaSharp.Views.WinUI + true + None + false - +