diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e2f8a8efb..331ce21f1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -119,10 +119,10 @@ and test signing key build\Assets\TemporaryKey.pfx in your Win2D repository. You only need to perform the below steps once: -1. Open a PowerShell command prompt. +1. Open a PowerShell command prompt as an administrator. 2. Using the PowerShell command prompt, change to the 'build' directory from the root of the repository. -3. Run `powershell -ep Bypass GenerateTestPfx.ps1`. - * GenerateTestPfx.ps1 registers the test package certificate to CurrentUser\My certificate store and saves the private key to `build\Assets\TemporaryKey.pfx` for use in building the Store unit tests package. This file is ignored by .gitignore from being included in commits. +3. Run `.\GenerateTestPfx.ps1`. + * GenerateTestPfx.ps1 registers the test package certificate to LocalMachine\TrustedPeople certificate store and saves the private key to `build\Assets\TemporaryKey.pfx` for use in building the Store unit tests package. This file is ignored by .gitignore from being included in commits. #### Submit a pull request to the main repository diff --git a/Microsoft.Graphics.Win2D.sln b/Microsoft.Graphics.Win2D.sln index bdacbe28e..61cea9da4 100644 --- a/Microsoft.Graphics.Win2D.sln +++ b/Microsoft.Graphics.Win2D.sln @@ -47,6 +47,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winrt.test.nativecomponent. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "winrt.test.external.uap", "winrt\test.external\winrt.test.external.uap.vcxproj", "{F33C7CB9-5ECA-47B7-9393-81E6E8F0BD34}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleSample.winappsdk", "samples\SimpleSample\SimpleSample.winappsdk.csproj", "{16DE7EC1-EDB4-4C29-9598-487A0D211D99}" +EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C868222C-3A9F-419D-9B8F-FAE49D14F91D}" ProjectSection(SolutionItems) = preProject global.json = global.json @@ -188,6 +190,24 @@ Global {B44A302A-EBBA-45F0-A94C-8E5F5F4635F7}.Release|x64.ActiveCfg = Release|x64 {B44A302A-EBBA-45F0-A94C-8E5F5F4635F7}.Release|x64.Build.0 = Release|x64 {B44A302A-EBBA-45F0-A94C-8E5F5F4635F7}.Release|x64.Deploy.0 = Release|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|ARM64.Build.0 = Debug|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|ARM64.Deploy.0 = Debug|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|Win32.ActiveCfg = Debug|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|Win32.Build.0 = Debug|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|Win32.Deploy.0 = Debug|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|x64.ActiveCfg = Debug|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|x64.Build.0 = Debug|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Debug|x64.Deploy.0 = Debug|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|ARM64.ActiveCfg = Release|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|ARM64.Build.0 = Release|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|ARM64.Deploy.0 = Release|ARM64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|Win32.ActiveCfg = Release|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|Win32.Build.0 = Release|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|Win32.Deploy.0 = Release|Win32 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|x64.ActiveCfg = Release|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|x64.Build.0 = Release|x64 + {16DE7EC1-EDB4-4C29-9598-487A0D211D99}.Release|x64.Deploy.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Win2D.proj b/Win2D.proj index 413496bf0..e1b72db51 100644 --- a/Win2D.proj +++ b/Win2D.proj @@ -16,7 +16,7 @@ Debug;Release true true - false + true true @@ -51,6 +51,16 @@ Win32;x64 desktop + + + Win32;x64 + store + false + + + + false + @@ -64,28 +74,28 @@ desktop + + + + + - - - - - + DependsOnTargets="BuildProjects; CheckCode; BuildDocs; RunTests" /> - - + @@ -185,15 +195,35 @@ + + + + + + + + + + + <_VsTestPathUnderCommonTools>..\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe - <_VsTest Condition="Exists('$(VS120COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS120COMNTOOLS)$(_VsTestPathUnderCommonTools) - <_VsTest Condition="Exists('$(VS140COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS140COMNTOOLS)$(_VsTestPathUnderCommonTools) - <_VsTest Condition="Exists('$(VS150COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS150COMNTOOLS)$(_VsTestPathUnderCommonTools) - <_VsTest Condition="Exists('$(VS160COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS160COMNTOOLS)$(_VsTestPathUnderCommonTools) <_VsTest Condition="Exists('$(VS170COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS170COMNTOOLS)$(_VsTestPathUnderCommonTools) + <_VsTest Condition="Exists('$(VS180COMNTOOLS)$(_VsTestPathUnderCommonTools)')">$(VS180COMNTOOLS)$(_VsTestPathUnderCommonTools) "$([System.IO.Path]::GetFullPath('$(_VsTest)'))" @@ -210,14 +240,14 @@ - + - + x86 %(ProjectsToBuild.Platform) @@ -225,12 +255,12 @@ bin\%(ProjectsToBuild.BinDir)%(TestProjects.TestPlatform)\%(ProjectsToBuild.Configuration) - %(ProjectsToBuild.Filename)_1.0.0.0_%(ProjectsToBuild.Platform) - %(ProjectsToBuild.Filename)_1.0.0.0_%(ProjectsToBuild.Platform)_%(ProjectsToBuild.Configuration) + %(ProjectsToBuild.Filename)_1.0.0.0_%(TestProjects.TestPlatform) + %(ProjectsToBuild.Filename)_1.0.0.0_%(TestProjects.TestPlatform)_%(ProjectsToBuild.Configuration) %(TestProjects.TestPath)\%(ProjectsToBuild.Filename)\%(ProjectsToBuild.Filename).dll - %(TestProjects.TestPath)\%(ProjectsToBuild.Filename)\AppPackages\%(TestProjects.TestAppX)_Test\%(TestProjects.TestAppX).appx + %(TestProjects.TestPath)\%(ProjectsToBuild.Filename)\AppPackages\%(TestProjects.TestAppX)_Test\%(TestProjects.TestAppX).msix %(TestProjects.TestArgs) /Platform:x64 @@ -253,7 +283,7 @@ %(BuildConfiguration.Identity) - + %(BuildPlatform.Identity) diff --git a/build.cmd b/build.cmd index c905c9940..6d2cf6b7c 100644 --- a/build.cmd +++ b/build.cmd @@ -6,23 +6,6 @@ IF "%VisualStudioVersion%" LSS "16.0" ( GOTO WRONG_COMMAND_PROMPT ) -WHERE /Q nuget >NUL -IF %ERRORLEVEL% NEQ 0 ( - ECHO nuget not found. - ECHO. - ECHO Run "%~pd0download-nuget.cmd" to download the latest version, or update PATH as appropriate. - GOTO END -) - -@REM Restore packages manually, since this does not get picked up by Win2D.proj -set Platform=AnyCPU -set Configuration=Release -nuget.exe restore .\Microsoft.Graphics.Win2D.sln -set Platform=AnyCPU -set Configuration=Debug -nuget.exe restore .\Microsoft.Graphics.Win2D.sln - - WHERE /Q msbuild >NUL IF %ERRORLEVEL% NEQ 0 ( ECHO Error: It appears that 'msbuild' is not available in this environment. @@ -37,11 +20,16 @@ IF %ERRORLEVEL% NEQ 0 ( GOTO END ) -ECHO. +msbuild "%~dp0tools\docs\BuildDocs.proj" /nologo /v:m /p:IntellisenseOnly=true -SET /p VERSION= - + diff --git a/build/Win2D.cpp.props b/build/Win2D.cpp.props index 8a86d2e15..afb9e61a6 100644 --- a/build/Win2D.cpp.props +++ b/build/Win2D.cpp.props @@ -14,10 +14,6 @@ - - Debug - ARM - Debug ARM64 @@ -30,10 +26,6 @@ Debug x64 - - Release - ARM - Release ARM64 @@ -48,12 +40,16 @@ + + x64 + + - v143 + v145 - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 @@ -113,10 +109,8 @@ true false $(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories) - /bigobj /Zm450 /wd4503 /wd4467 /D_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1 %(AdditionalOptions) + /bigobj /wd4503 /wd4467 /D_CRT_STDIO_LEGACY_WIDE_SPECIFIERS=1 %(AdditionalOptions) + + + + - + diff --git a/build/nuget/release-nuget.config b/build/nuget/release-nuget.config index 59f2bbfdb..200b6a0ad 100644 --- a/build/nuget/release-nuget.config +++ b/build/nuget/release-nuget.config @@ -1,8 +1,6 @@ - - diff --git a/build/pkges/readme.txt b/build/pkges/readme.txt deleted file mode 100644 index 490432082..000000000 --- a/build/pkges/readme.txt +++ /dev/null @@ -1,2 +0,0 @@ -This directory contains support files for internal Microsoft builds of Win2D, -which can optionally consume prerelease versions of the Windows SDK via NuGet. diff --git a/nuget.config b/nuget.config index eb0c5e708..18ad49bf7 100644 --- a/nuget.config +++ b/nuget.config @@ -1,8 +1,6 @@  - - diff --git a/samples/SimpleSample/App.xaml b/samples/SimpleSample/App.xaml new file mode 100644 index 000000000..eb280a3e7 --- /dev/null +++ b/samples/SimpleSample/App.xaml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/samples/SimpleSample/App.xaml.cs b/samples/SimpleSample/App.xaml.cs new file mode 100644 index 000000000..dac817f9a --- /dev/null +++ b/samples/SimpleSample/App.xaml.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using Microsoft.UI.Xaml.Shapes; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.ApplicationModel; +using Windows.ApplicationModel.Activation; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace SimpleSample { + /// + /// Provides application-specific behavior to supplement the default Application class. + /// + public partial class App : Application { + private Window _window; + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() { + InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) { + _window = new MainWindow(); + _window.Activate(); + } + } +} diff --git a/samples/SimpleSample/Assets/LockScreenLogo.scale-200.png b/samples/SimpleSample/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 000000000..7440f0d4b Binary files /dev/null and b/samples/SimpleSample/Assets/LockScreenLogo.scale-200.png differ diff --git a/samples/SimpleSample/Assets/SplashScreen.scale-200.png b/samples/SimpleSample/Assets/SplashScreen.scale-200.png new file mode 100644 index 000000000..32f486a86 Binary files /dev/null and b/samples/SimpleSample/Assets/SplashScreen.scale-200.png differ diff --git a/samples/SimpleSample/Assets/Square150x150Logo.scale-200.png b/samples/SimpleSample/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 000000000..53ee3777e Binary files /dev/null and b/samples/SimpleSample/Assets/Square150x150Logo.scale-200.png differ diff --git a/samples/SimpleSample/Assets/Square44x44Logo.scale-200.png b/samples/SimpleSample/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 000000000..f713bba67 Binary files /dev/null and b/samples/SimpleSample/Assets/Square44x44Logo.scale-200.png differ diff --git a/samples/SimpleSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/samples/SimpleSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 000000000..dc9f5bea0 Binary files /dev/null and b/samples/SimpleSample/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/samples/SimpleSample/Assets/StoreLogo.png b/samples/SimpleSample/Assets/StoreLogo.png new file mode 100644 index 000000000..a4586f26b Binary files /dev/null and b/samples/SimpleSample/Assets/StoreLogo.png differ diff --git a/samples/SimpleSample/Assets/Wide310x150Logo.scale-200.png b/samples/SimpleSample/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 000000000..8b4a5d0dd Binary files /dev/null and b/samples/SimpleSample/Assets/Wide310x150Logo.scale-200.png differ diff --git a/samples/SimpleSample/Directory.Build.props b/samples/SimpleSample/Directory.Build.props new file mode 100644 index 000000000..471b169a6 --- /dev/null +++ b/samples/SimpleSample/Directory.Build.props @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/samples/SimpleSample/MainPage.xaml b/samples/SimpleSample/MainPage.xaml new file mode 100644 index 000000000..e639cd8a7 --- /dev/null +++ b/samples/SimpleSample/MainPage.xaml @@ -0,0 +1,22 @@ + + + + + + + + + diff --git a/samples/SimpleSample/MainPage.xaml.cs b/samples/SimpleSample/MainPage.xaml.cs new file mode 100644 index 000000000..c869991a3 --- /dev/null +++ b/samples/SimpleSample/MainPage.xaml.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +using Microsoft.Graphics.Canvas.UI.Xaml; +using Microsoft.UI; +using Microsoft.UI.Xaml.Controls; + +namespace SimpleSample +{ + /// + /// Draws some graphics using Win2D + /// + public sealed partial class MainPage : Page + { + public MainPage() + { + this.InitializeComponent(); + } + + void canvasControl_Draw(CanvasControl sender, CanvasDrawEventArgs args) + { + args.DrawingSession.DrawEllipse(155, 115, 80, 30, Colors.Black, 3); + args.DrawingSession.DrawText("Hello, world!", 100, 100, Colors.Yellow); + } + } +} diff --git a/samples/SimpleSample/MainWindow.xaml b/samples/SimpleSample/MainWindow.xaml new file mode 100644 index 000000000..d1767ded9 --- /dev/null +++ b/samples/SimpleSample/MainWindow.xaml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/samples/SimpleSample/MainWindow.xaml.cs b/samples/SimpleSample/MainWindow.xaml.cs new file mode 100644 index 000000000..a969aec3e --- /dev/null +++ b/samples/SimpleSample/MainWindow.xaml.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// +// Licensed under the MIT License. See LICENSE.txt in the project root for license information. + +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Controls.Primitives; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using Windows.Foundation; +using Windows.Foundation.Collections; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace SimpleSample { + /// + /// An empty window that can be used on its own or navigated to within a Frame. + /// + public sealed partial class MainWindow : Window { + public MainWindow() { + InitializeComponent(); + } + } +} diff --git a/samples/SimpleSample/Package.appxmanifest b/samples/SimpleSample/Package.appxmanifest new file mode 100644 index 000000000..b3bee2a6e --- /dev/null +++ b/samples/SimpleSample/Package.appxmanifest @@ -0,0 +1,50 @@ + + + + + + + + + + SimpleSample + Microsoft Corporation + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/SimpleSample/Properties/launchSettings.json b/samples/SimpleSample/Properties/launchSettings.json new file mode 100644 index 000000000..dcc68e640 --- /dev/null +++ b/samples/SimpleSample/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "SimpleSample (Package)": { + "commandName": "MsixPackage" + }, + "SimpleSample (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/samples/SimpleSample/SimpleSample.winappsdk.csproj b/samples/SimpleSample/SimpleSample.winappsdk.csproj new file mode 100644 index 000000000..edfa4d27b --- /dev/null +++ b/samples/SimpleSample/SimpleSample.winappsdk.csproj @@ -0,0 +1,72 @@ + + + {16DE7EC1-EDB4-4C29-9598-487A0D211D99} + WinExe + net8.0-windows10.0.22621.0 + 10.0.17763.0 + SimpleSample + app.manifest + x86;x64;ARM64 + win-x86;win-x64;win-arm64 + win-$(__Platform).pubxml + true + false + true + disable + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + False + True + False + True + + \ No newline at end of file diff --git a/samples/SimpleSample/app.manifest b/samples/SimpleSample/app.manifest new file mode 100644 index 000000000..48d85529f --- /dev/null +++ b/samples/SimpleSample/app.manifest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + PerMonitorV2 + + + \ No newline at end of file diff --git a/tools/checkcode/RunCodeChecks.proj b/tools/checkcode/RunCodeChecks.proj index b2edc6649..1720be701 100644 --- a/tools/checkcode/RunCodeChecks.proj +++ b/tools/checkcode/RunCodeChecks.proj @@ -32,7 +32,7 @@ c;cpp;h;inl;cs;idl;rc;hlsl xml;xaml;aml ;gitattributes;gitignore;orig;jpg;png;dds;txt;md;pfx;cmd;bat;proj;nuspec;props;targets;def;sln;csproj;vcxproj;vcxitems;filters;projitems;shproj;shfbproj;content;config;appxmanifest;suo;ipch;sdf;log;opensdf;user;exe;bmp;ico;tif;vsdx;svg;json;bin;opendb;db;binlog;vsconfig_buildtools;ps1;sscignore;manifest;pubxml;pid;pdb;yml - .git;obj;bin;TestResults;build;.nuget;packages;.vs;.vscode;.pipelines + ".git;obj;bin;TestResults;build;.nuget;packages;.vs;.vscode;.pipelines;Generated Files" $(CopyrightFile) /rootdir:$(RootDir) /cppext:$(CppExt) /xmlext:$(XmlExt) /skipext:$(SkipExt) /skipdir:$(SkipDir) /checkformatting diff --git a/tools/codegen/exe/Settings.xml b/tools/codegen/exe/Settings.xml index fc2d59887..b0841b255 100644 --- a/tools/codegen/exe/Settings.xml +++ b/tools/codegen/exe/Settings.xml @@ -97,7 +97,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + @@ -246,58 +246,58 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - - + + - + - + - + - - + + - + - - + + - - - - + + + + - + - - + + - + - + - - + + diff --git a/tools/docs/BuildDocs.proj b/tools/docs/BuildDocs.proj index 336fbbd99..8c34b2cb8 100644 --- a/tools/docs/BuildDocs.proj +++ b/tools/docs/BuildDocs.proj @@ -28,6 +28,9 @@ + + + @@ -62,9 +65,9 @@ - + - $(MSBuildThisFileDirectory)..\..\packages\System.Runtime.4.0.20\ref\dotnet + $(MSBuildThisFileDirectory)..\..\packages\System.Runtime.4.3.1\ref\netcore50 @@ -126,7 +129,7 @@ - + diff --git a/tools/docs/BuildDocs.shfbproj b/tools/docs/BuildDocs.shfbproj index 705a702c1..7f9cb81c5 100644 --- a/tools/docs/BuildDocs.shfbproj +++ b/tools/docs/BuildDocs.shfbproj @@ -1,14 +1,14 @@ - $(MSBuildThisFileDirectory)..\..\packages\EWSoftware.SHFB.2016.9.17.0\Tools\ + $(MSBuildThisFileDirectory)..\..\packages\EWSoftware.SHFB.2026.1.20\Tools\ 2.0 {ec5bd60b-d070-432b-bf14-ab50cfc1d7f8} - 1.9.9.0 - .NET for Universal Windows - $(MSBuildThisFileDirectory)..\..\packages\EWSoftware.SHFB.UniversalWindows.1.0.1\ + 2017.9.26.0 + .NET Core/.NET Standard/.NET 5.0+ + $(MSBuildThisFileDirectory)..\..\packages\EWSoftware.SHFB.NET.10.0.0\ Documentation en-US OnlyErrors diff --git a/tools/docs/ExtractAPISurface/AssemblyCollection.cs b/tools/docs/ExtractAPISurface/AssemblyCollection.cs index fd51cc2d1..37537eeff 100644 --- a/tools/docs/ExtractAPISurface/AssemblyCollection.cs +++ b/tools/docs/ExtractAPISurface/AssemblyCollection.cs @@ -90,10 +90,7 @@ void ReflectionOnlyNamespaceResolve(object sender, NamespaceResolveEventArgs e) { foreach (var assembly in referenceAssemblies.Concat(inputAssemblies)) { - if (GetDefinedTypes(assembly).Any(type => type.Namespace == e.NamespaceName)) - { - e.ResolvedAssemblies.Add(assembly); - } + e.ResolvedAssemblies.Add(assembly); //Simply add all assemblies to avoid issue with circular dependencies } } } diff --git a/tools/docs/packages.config b/tools/docs/packages.config index 2a3f4a9ba..ffe3c8eaf 100644 --- a/tools/docs/packages.config +++ b/tools/docs/packages.config @@ -1,6 +1,6 @@ - - - + + + \ No newline at end of file diff --git a/winrt/dll/packages.config b/winrt/dll/packages.config index 32c240e87..b9677aa32 100644 --- a/winrt/dll/packages.config +++ b/winrt/dll/packages.config @@ -1,4 +1,7 @@  + + + \ No newline at end of file diff --git a/winrt/dll/winrt.dll.uap.vcxproj b/winrt/dll/winrt.dll.uap.vcxproj index 28c983d29..546c28eb0 100644 --- a/winrt/dll/winrt.dll.uap.vcxproj +++ b/winrt/dll/winrt.dll.uap.vcxproj @@ -10,9 +10,9 @@ UAP Microsoft.Graphics.Canvas $(ItemsRootNamespace) - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 - v143 + v145 true diff --git a/winrt/docsrc/CanvasAnimatedControl.xml b/winrt/docsrc/CanvasAnimatedControl.xml index 2d181509e..d82147a28 100644 --- a/winrt/docsrc/CanvasAnimatedControl.xml +++ b/winrt/docsrc/CanvasAnimatedControl.xml @@ -57,7 +57,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license This is raised just before the game loop starts running. Applications can hook this to perform any initialization that must happen on the game loop thread. For example, + cref="M:Microsoft.Graphics.Canvas.UI.Xaml.CanvasAnimatedControl.CreateCoreIndependentInputSource(Microsoft.UI.Input.InputPointerSourceDeviceKinds)"/> must be called from the thread that will process the input events raised by the CoreIndependentInputSource.

@@ -251,7 +251,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

One strategy for handling this is to use + cref="M:Microsoft.Graphics.Canvas.UI.Xaml.ICanvasAnimatedControl.RunOnGameLoopThreadAsync(Microsoft.UI.Dispatching.DispatcherQueueHandler)"/> to execute code on the game loop thread. For example: private void animatedControl_PointerPressed(object sender, PointerRoutedEventArgs e) @@ -271,7 +271,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

For more advanced input handling, CanvasAnimatedControl provides . + cref="M:Microsoft.Graphics.Canvas.UI.Xaml.CanvasAnimatedControl.CreateCoreIndependentInputSource(Microsoft.UI.Input.InputPointerSourceDeviceKinds)"/>. This allows input to be processed on any thread (including the game loop thread). This gives the app finer control over input processing.

@@ -291,7 +291,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

One possible approach here is to use to execute code on the game loop thread. The gotcha here is that the KeyEventArgs @@ -363,7 +363,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

Arbitrary code can be scheduled to run on the game loop thread using - . + . Work scheduled with this method will only run after CreateResources has completed.

@@ -408,7 +408,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license XAML control intended for displaying animating content. - + @@ -561,7 +561,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

This event is the first chance that an application has to execute code on the game loop thread. This is the recommended place to call , + cref="M:Microsoft.Graphics.Canvas.UI.Xaml.ICanvasAnimatedControl.CreateCoreIndependentInputSource(Microsoft.UI.Input.InputPointerSourceDeviceKinds)"/>, create GestureRecognizers and register event handlers against them. @@ -764,7 +764,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - +

Creates an input source that can process input on a non-UI thread (such as the game loop thread).

@@ -801,7 +801,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

- + Creates an input source that can process input on a non-UI thread (such as the game loop thread). @@ -834,7 +834,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + Schedules the provided callback to run asynchronously on the game loop thread.

@@ -895,7 +895,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

Gets whether the current thread is the game loop thread.
- + Schedules the provided callback to run asynchronously on the game loop thread. diff --git a/winrt/docsrc/CanvasComposition.xml b/winrt/docsrc/CanvasComposition.xml index 50531cc51..ae2f3642c 100644 --- a/winrt/docsrc/CanvasComposition.xml +++ b/winrt/docsrc/CanvasComposition.xml @@ -13,23 +13,17 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - Methods for using Win2D with Windows.UI.Composition. + Methods for using Win2D with Microsoft.UI.Composition. - + Creates a CompositionGraphicsDevice associated with a CanvasDevice. - - - Creates an ICompositionSurface associated with a CanvasSwapChain. - - - - + Creates a CanvasDrawingSession for drawing to the given CompositionDrawingSurface. @@ -45,7 +39,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + Creates a CanvasDrawingSession for updating a region of the given CompositionDrawingSurface. @@ -56,7 +50,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + Creates a CanvasDrawingSession for updating a region of the given CompositionDrawingSurface, using a custom DPI setting. @@ -73,19 +67,19 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + Gets the CanvasDevice associated with the given CompositionGraphicsDevice. - + Resizes the given CompositionDrawingSurface. - + Sets the CanvasDevice associated with the given CompositionGraphicsDevice. diff --git a/winrt/docsrc/CanvasDrawingSession.xml b/winrt/docsrc/CanvasDrawingSession.xml index ae60114d3..36dec9019 100644 --- a/winrt/docsrc/CanvasDrawingSession.xml +++ b/winrt/docsrc/CanvasDrawingSession.xml @@ -1085,7 +1085,8 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + + Draws a gradient mesh, relative to the origin. diff --git a/winrt/docsrc/CanvasGeometry.xml b/winrt/docsrc/CanvasGeometry.xml index 7d17589f7..26095e1aa 100644 --- a/winrt/docsrc/CanvasGeometry.xml +++ b/winrt/docsrc/CanvasGeometry.xml @@ -626,7 +626,8 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license - + + diff --git a/winrt/docsrc/CanvasSwapChain.xml b/winrt/docsrc/CanvasSwapChain.xml index 787b4907b..a8ae5dd4f 100644 --- a/winrt/docsrc/CanvasSwapChain.xml +++ b/winrt/docsrc/CanvasSwapChain.xml @@ -156,7 +156,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license

- + Initializes a new instance of a CanvasSwapChain, suitable for use with HWND windows.

diff --git a/winrt/docsrc/DPI.aml b/winrt/docsrc/DPI.aml index 1b96dbde4..49d1341ac 100644 --- a/winrt/docsrc/DPI.aml +++ b/winrt/docsrc/DPI.aml @@ -309,7 +309,7 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license Windows.UI.Composition APIs such as CreateDrawingSurface always specify sizes in pixel units. When using Win2D to draw onto a composition surface, you can specify whatever DPI you want to use when calling - M:Microsoft.Graphics.Canvas.UI.Composition.CanvasComposition.CreateDrawingSession(Windows.UI.Composition.CompositionDrawingSurface,Windows.Foundation.Rect,System.Single). + M:Microsoft.Graphics.Canvas.UI.Composition.CanvasComposition.CreateDrawingSession(Microsoft.UI.Composition.CompositionDrawingSurface,Windows.Foundation.Rect,System.Single). All drawing performed through the returned CanvasDrawingSession will be scaled up or down accordingly. diff --git a/winrt/docsrc/Features.aml b/winrt/docsrc/Features.aml index fb863a73e..5789f8971 100644 --- a/winrt/docsrc/Features.aml +++ b/winrt/docsrc/Features.aml @@ -70,11 +70,14 @@ Licensed under the MIT License. See LICENSE.txt in the project root for license T:Microsoft.Graphics.Canvas.CanvasCommandList for later replay + + Load, draw, and manipulate M:Microsoft.Graphics.Canvas.Svg.CanvasSvgDocument.LoadFromXml(Microsoft.Graphics.Canvas.ICanvasResourceCreator,System.String) diff --git a/winrt/lib/effects/generated/EffectMakers.cpp b/winrt/lib/effects/generated/EffectMakers.cpp index 6e6aa21f0..e185292d5 100644 --- a/winrt/lib/effects/generated/EffectMakers.cpp +++ b/winrt/lib/effects/generated/EffectMakers.cpp @@ -6,127 +6,127 @@ #include "pch.h" +#include "AlphaMaskEffect.h" #include "ArithmeticCompositeEffect.h" #include "AtlasEffect.h" #include "BlendEffect.h" #include "BorderEffect.h" #include "BrightnessEffect.h" +#include "ChromaKeyEffect.h" #include "ColorManagementEffect.h" #include "ColorMatrixEffect.h" #include "ColorSourceEffect.h" #include "CompositeEffect.h" +#include "ContrastEffect.h" #include "ConvolveMatrixEffect.h" #include "CropEffect.h" +#include "CrossFadeEffect.h" #include "DirectionalBlurEffect.h" #include "DiscreteTransferEffect.h" #include "DisplacementMapEffect.h" #include "DistantDiffuseEffect.h" #include "DistantSpecularEffect.h" #include "DpiCompensationEffect.h" +#include "EdgeDetectionEffect.h" +#include "EmbossEffect.h" +#include "ExposureEffect.h" #include "GammaTransferEffect.h" #include "GaussianBlurEffect.h" +#include "GrayscaleEffect.h" +#include "HighlightsAndShadowsEffect.h" #include "HueRotationEffect.h" +#include "HueToRgbEffect.h" +#include "InvertEffect.h" #include "LinearTransferEffect.h" #include "LuminanceToAlphaEffect.h" #include "MorphologyEffect.h" +#include "OpacityEffect.h" #include "OpacityMetadataEffect.h" #include "PointDiffuseEffect.h" #include "PointSpecularEffect.h" +#include "PosterizeEffect.h" #include "PremultiplyEffect.h" +#include "RgbToHueEffect.h" #include "SaturationEffect.h" #include "ScaleEffect.h" +#include "SepiaEffect.h" #include "ShadowEffect.h" +#include "SharpenEffect.h" #include "SpotDiffuseEffect.h" #include "SpotSpecularEffect.h" +#include "StraightenEffect.h" +#include "TableTransfer3DEffect.h" #include "TableTransferEffect.h" +#include "TemperatureAndTintEffect.h" #include "TileEffect.h" +#include "TintEffect.h" #include "Transform2DEffect.h" #include "Transform3DEffect.h" #include "TurbulenceEffect.h" #include "UnPremultiplyEffect.h" -#include "AlphaMaskEffect.h" -#include "ChromaKeyEffect.h" -#include "ContrastEffect.h" -#include "CrossFadeEffect.h" -#include "EdgeDetectionEffect.h" -#include "EmbossEffect.h" -#include "ExposureEffect.h" -#include "GrayscaleEffect.h" -#include "HighlightsAndShadowsEffect.h" -#include "HueToRgbEffect.h" -#include "InvertEffect.h" -#include "OpacityEffect.h" -#include "PosterizeEffect.h" -#include "RgbToHueEffect.h" -#include "SepiaEffect.h" -#include "SharpenEffect.h" -#include "StraightenEffect.h" -#include "TableTransfer3DEffect.h" -#include "TemperatureAndTintEffect.h" -#include "TintEffect.h" #include "VignetteEffect.h" std::pair CanvasEffect::m_effectMakers[] = { + { AlphaMaskEffect::EffectId(), MakeEffect }, { ArithmeticCompositeEffect::EffectId(), MakeEffect }, { AtlasEffect::EffectId(), MakeEffect }, { BlendEffect::EffectId(), MakeEffect }, { BorderEffect::EffectId(), MakeEffect }, { BrightnessEffect::EffectId(), MakeEffect }, + { ChromaKeyEffect::EffectId(), MakeEffect }, { ColorManagementEffect::EffectId(), MakeEffect }, { ColorMatrixEffect::EffectId(), MakeEffect }, { ColorSourceEffect::EffectId(), MakeEffect }, { CompositeEffect::EffectId(), MakeEffect }, + { ContrastEffect::EffectId(), MakeEffect }, { ConvolveMatrixEffect::EffectId(), MakeEffect }, { CropEffect::EffectId(), MakeEffect }, + { CrossFadeEffect::EffectId(), MakeEffect }, { DirectionalBlurEffect::EffectId(), MakeEffect }, { DiscreteTransferEffect::EffectId(), MakeEffect }, { DisplacementMapEffect::EffectId(), MakeEffect }, { DistantDiffuseEffect::EffectId(), MakeEffect }, { DistantSpecularEffect::EffectId(), MakeEffect }, { DpiCompensationEffect::EffectId(), MakeEffect }, + { EdgeDetectionEffect::EffectId(), MakeEffect }, + { EmbossEffect::EffectId(), MakeEffect }, + { ExposureEffect::EffectId(), MakeEffect }, { GammaTransferEffect::EffectId(), MakeEffect }, { GaussianBlurEffect::EffectId(), MakeEffect }, + { GrayscaleEffect::EffectId(), MakeEffect }, + { HighlightsAndShadowsEffect::EffectId(), MakeEffect }, { HueRotationEffect::EffectId(), MakeEffect }, + { HueToRgbEffect::EffectId(), MakeEffect }, + { InvertEffect::EffectId(), MakeEffect }, { LinearTransferEffect::EffectId(), MakeEffect }, { LuminanceToAlphaEffect::EffectId(), MakeEffect }, { MorphologyEffect::EffectId(), MakeEffect }, + { OpacityEffect::EffectId(), MakeEffect }, { OpacityMetadataEffect::EffectId(), MakeEffect }, { PointDiffuseEffect::EffectId(), MakeEffect }, { PointSpecularEffect::EffectId(), MakeEffect }, + { PosterizeEffect::EffectId(), MakeEffect }, { PremultiplyEffect::EffectId(), MakeEffect }, + { RgbToHueEffect::EffectId(), MakeEffect }, { SaturationEffect::EffectId(), MakeEffect }, { ScaleEffect::EffectId(), MakeEffect }, + { SepiaEffect::EffectId(), MakeEffect }, { ShadowEffect::EffectId(), MakeEffect }, + { SharpenEffect::EffectId(), MakeEffect }, { SpotDiffuseEffect::EffectId(), MakeEffect }, { SpotSpecularEffect::EffectId(), MakeEffect }, + { StraightenEffect::EffectId(), MakeEffect }, + { TableTransfer3DEffect::EffectId(), MakeEffect }, { TableTransferEffect::EffectId(), MakeEffect }, + { TemperatureAndTintEffect::EffectId(), MakeEffect }, { TileEffect::EffectId(), MakeEffect }, + { TintEffect::EffectId(), MakeEffect }, { Transform2DEffect::EffectId(), MakeEffect }, { Transform3DEffect::EffectId(), MakeEffect }, { TurbulenceEffect::EffectId(), MakeEffect }, { UnPremultiplyEffect::EffectId(), MakeEffect }, - { AlphaMaskEffect::EffectId(), MakeEffect }, - { ChromaKeyEffect::EffectId(), MakeEffect }, - { ContrastEffect::EffectId(), MakeEffect }, - { CrossFadeEffect::EffectId(), MakeEffect }, - { EdgeDetectionEffect::EffectId(), MakeEffect }, - { EmbossEffect::EffectId(), MakeEffect }, - { ExposureEffect::EffectId(), MakeEffect }, - { GrayscaleEffect::EffectId(), MakeEffect }, - { HighlightsAndShadowsEffect::EffectId(), MakeEffect }, - { HueToRgbEffect::EffectId(), MakeEffect }, - { InvertEffect::EffectId(), MakeEffect }, - { OpacityEffect::EffectId(), MakeEffect }, - { PosterizeEffect::EffectId(), MakeEffect }, - { RgbToHueEffect::EffectId(), MakeEffect }, - { SepiaEffect::EffectId(), MakeEffect }, - { SharpenEffect::EffectId(), MakeEffect }, - { StraightenEffect::EffectId(), MakeEffect }, - { TableTransfer3DEffect::EffectId(), MakeEffect }, - { TemperatureAndTintEffect::EffectId(), MakeEffect }, - { TintEffect::EffectId(), MakeEffect }, { VignetteEffect::EffectId(), MakeEffect }, { GUID_NULL, nullptr } diff --git a/winrt/lib/winrt.lib.uap.vcxproj b/winrt/lib/winrt.lib.uap.vcxproj index ceb2b3edb..a18d49658 100644 --- a/winrt/lib/winrt.lib.uap.vcxproj +++ b/winrt/lib/winrt.lib.uap.vcxproj @@ -16,9 +16,9 @@ Microsoft.Graphics.Canvas Microsoft.Graphics.Canvas Microsoft.Graphics.Canvas:3 - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 - v143 + v145 true + None + + @@ -41,7 +46,7 @@ - 10.0.19041.55 + 10.0.$([System.Version]::Parse('$(TargetPlatformVersion)').Build).57 Microsoft.Graphics.Canvas; @@ -52,12 +57,13 @@ - + + + - diff --git a/winrt/test.external/packages.config b/winrt/test.external/packages.config index 216b1c07a..599070873 100644 --- a/winrt/test.external/packages.config +++ b/winrt/test.external/packages.config @@ -1,4 +1,5 @@  - + + \ No newline at end of file diff --git a/winrt/test.external/winrt.test.external.uap.vcxproj b/winrt/test.external/winrt.test.external.uap.vcxproj index 402f1f1a3..16eed9a2f 100644 --- a/winrt/test.external/winrt.test.external.uap.vcxproj +++ b/winrt/test.external/winrt.test.external.uap.vcxproj @@ -7,9 +7,9 @@ 14.0 en-US 16.0 - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 - v143 + v145 <_NoWinAPIFamilyApp>true diff --git a/winrt/test.internal/winrt.test.internal.uap.vcxproj b/winrt/test.internal/winrt.test.internal.uap.vcxproj index e46d9cdef..14e846afb 100644 --- a/winrt/test.internal/winrt.test.internal.uap.vcxproj +++ b/winrt/test.internal/winrt.test.internal.uap.vcxproj @@ -9,7 +9,7 @@ winrt_test 14.0 UAP - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 true <_NoWinAPIFamilyApp>true @@ -24,7 +24,7 @@ - v143 + v145 winrt.test.internal.uap DynamicLibrary false diff --git a/winrt/test.managed/CanvasBitmapTests.cs b/winrt/test.managed/CanvasBitmapTests.cs index 638ece1b9..9c89b0611 100644 --- a/winrt/test.managed/CanvasBitmapTests.cs +++ b/winrt/test.managed/CanvasBitmapTests.cs @@ -18,6 +18,7 @@ using Windows.Storage; using Windows.Graphics.DirectX; using System.Diagnostics; +using Windows.Graphics.Imaging; namespace test.managed { @@ -329,7 +330,6 @@ public void SetPixelColorsReadHazards() } } - #if WINDOWS_UWP [TestClass] public class CanvasBitmapCreateFromSoftwareBitmapTests { @@ -421,7 +421,7 @@ void TestCreateFromSoftwareBitmap(CanvasDevice device, BitmapPixelFormat pixelFo if (!IsFormatSupportedByWin2D(pixelFormat, alphaMode)) { - Assert.ThrowsException(() => + Utils.AssertThrowsException(() => { CanvasBitmap.CreateFromSoftwareBitmap(device, softwareBitmap); }); @@ -494,5 +494,4 @@ bool IsFormatSupportedByWin2D(BitmapPixelFormat format, BitmapAlphaMode alphaMod return true; } } - #endif } diff --git a/winrt/test.managed/DpiTests.cs b/winrt/test.managed/DpiTests.cs index 015e39249..83669a910 100644 --- a/winrt/test.managed/DpiTests.cs +++ b/winrt/test.managed/DpiTests.cs @@ -9,7 +9,7 @@ namespace test.managed { [TestClass] - public class DpiTests + public partial class DpiTests { [TestMethod] public void RenderTargetDpiTest() @@ -75,7 +75,7 @@ public void RenderTargetInheritsDpiFromResourceCreator() } - class TestResourceCreator : ICanvasResourceCreatorWithDpi + partial class TestResourceCreator : ICanvasResourceCreatorWithDpi { public TestResourceCreator(CanvasDevice device, float dpi) { diff --git a/winrt/test.managed/EffectTests.cs b/winrt/test.managed/EffectTests.cs index c30e12eb4..b3f957978 100644 --- a/winrt/test.managed/EffectTests.cs +++ b/winrt/test.managed/EffectTests.cs @@ -18,15 +18,13 @@ namespace test.managed { [TestClass] - public class EffectTests + public partial class EffectTests { CanvasDevice device, device2; ColorManagementProfile[] colorProfiles; -#if WINDOWS_UWP EffectTransferTable3D[] transferTables; -#endif // When viewed through CsWinRT, the Assembly is Microsoft.Graphics.Canvas.Interop.dll instead of @@ -474,11 +472,7 @@ value is bool || (float)c.A / 255, }; } - else if (value is ColorManagementProfile -#if WINDOWS_UWP - || value is EffectTransferTable3D -#endif - ) + else if (value is ColorManagementProfile || value is EffectTransferTable3D) { return new object[] { value }; } @@ -607,11 +601,7 @@ static object Unbox(object value, PropertyInfo property) (byte)(a[1] * 255), (byte)(a[2] * 255)); } - else if (type == typeof(ColorManagementProfile) -#if WINDOWS_UWP - || type == typeof(EffectTransferTable3D) -#endif - ) + else if (type == typeof(ColorManagementProfile) || type == typeof(EffectTransferTable3D)) { var a = (object[])value; Assert.AreEqual(1, a.Length); @@ -852,7 +842,6 @@ object GetArbitraryTestValue(Type type, bool whichOne) return colorProfiles[whichOne ? 0 : 1]; } -#if WINDOWS_UWP else if (type == typeof(EffectTransferTable3D)) { if (transferTables == null) @@ -866,7 +855,6 @@ object GetArbitraryTestValue(Type type, bool whichOne) return transferTables[whichOne ? 0 : 1]; } -#endif else { throw new NotSupportedException("Unsupported GetArbitraryTestValue type " + type); @@ -920,7 +908,6 @@ static void FilterOutCustomizedEffectProperties(Type effectType, ref List p.Name.EndsWith("Hdr")).Select(p => p.Name); @@ -1159,9 +1145,6 @@ public void ColorMatrixEffectCustomizations() } -#if WINDOWS_UWP - - [TestMethod] public void SepiaEffectCustomizations() { @@ -1248,9 +1231,6 @@ public void StraightenEffectDoesNotSupportHighQualityInterpolation() } -#endif // WINDOWS_UWP - - [TestMethod] public void Transform3DEffectDoesNotSupportHighQualityInterpolation() { @@ -1286,7 +1266,7 @@ public void Transform2DEffectSupportsAllInterpolationModes() } - class NotACanvasImage : IGraphicsEffectSource { } + partial class NotACanvasImage : IGraphicsEffectSource { } [TestMethod] diff --git a/winrt/test.managed/InkTests.cs b/winrt/test.managed/InkTests.cs index 22d1e1e07..3a39f3702 100644 --- a/winrt/test.managed/InkTests.cs +++ b/winrt/test.managed/InkTests.cs @@ -10,7 +10,7 @@ using System.Reflection; using Windows.Foundation; using Windows.UI; -using Windows.UI.Input.WINUI3_SUPPORTS_INKING; +using Windows.UI.Input.Inking; namespace test.managed { diff --git a/winrt/test.managed/Package.appxmanifest b/winrt/test.managed/Package.appxmanifest index 9c29ba4de..a0a1dd119 100644 --- a/winrt/test.managed/Package.appxmanifest +++ b/winrt/test.managed/Package.appxmanifest @@ -8,18 +8,17 @@ winrt.test.managed.winappsdk - getrou + Microsoft Corporation Assets\StoreLogo.png - - + diff --git a/winrt/test.managed/PathReceiver.cs b/winrt/test.managed/PathReceiver.cs index 9d1d4c1b6..25aad46ee 100644 --- a/winrt/test.managed/PathReceiver.cs +++ b/winrt/test.managed/PathReceiver.cs @@ -10,9 +10,9 @@ namespace test.managed { [TestClass] - public class PathReceiver + public partial class PathReceiver { - private class MyGeometryStreamReader : ICanvasPathReceiver + private partial class MyGeometryStreamReader : ICanvasPathReceiver { bool wasBeginFigureCalled; bool wasAddArcCalled; diff --git a/winrt/test.managed/PixelFormatTests.cs b/winrt/test.managed/PixelFormatTests.cs index 6ec2357f2..022618873 100644 --- a/winrt/test.managed/PixelFormatTests.cs +++ b/winrt/test.managed/PixelFormatTests.cs @@ -243,11 +243,8 @@ static void ValidateUnsupportedPixelFormatException(Action action) action(); Assert.Fail("should throw"); } - catch (Exception e) - { - Assert.IsTrue(e.Message.Contains("The bitmap pixel format is unsupported.")); - Assert.IsTrue(e.Message.Contains("0x88982F80")); - } + catch (Exception) + { } } diff --git a/winrt/test.managed/PixelShaderEffectTests.cs b/winrt/test.managed/PixelShaderEffectTests.cs index 90c984bae..bbbd93dc7 100644 --- a/winrt/test.managed/PixelShaderEffectTests.cs +++ b/winrt/test.managed/PixelShaderEffectTests.cs @@ -315,8 +315,7 @@ float4 main() : SV_Target } - // Test Disabled for WinUI3 - //[TestMethod] + [TestMethod] public void PixelShaderEffect_PropertiesDictionary_Methods() { const string hlsl = @@ -377,8 +376,7 @@ float4 main() : SV_Target } - // Test Disabled for WinUI3 - //[TestMethod] + [TestMethod] public void PixelShaderEffect_PropertiesDictionary_InsertErrorCases() { const string hlsl = @@ -1178,8 +1176,7 @@ float4 main() : SV_Target } } - // Test Disabled for WinUI3 - //[TestMethod] + [TestMethod] public void PixelShaderEffect_InputRectTooBigError() { using (new DisableDebugLayer()) @@ -1220,7 +1217,7 @@ float4 main() : SV_Target { ds.DrawImage(effect); } - }, " graph could not be rendered with the context's current tiling settings. (Exception from HRESULT: 0x88990027)"); + }); // But it's ok if we clamp the input back down to finite size. effect.Source1 = new CropEffect @@ -1303,8 +1300,6 @@ float4 main() : SV_Target } -#if WINDOWS_UWP - [TestMethod] public void PixelShaderEffect_ShaderReflectionSetsCoordinateMappingDefaults() { @@ -1363,6 +1358,5 @@ export float4 ShaderLinkingFunction(float4 input0 : INPUT0, Assert.AreEqual(SamplerCoordinateMapping.OneToOne, effect.Source4Mapping); } -#endif } } diff --git a/winrt/test.managed/Properties/PublishProfiles/win10-arm64.pubxml b/winrt/test.managed/Properties/PublishProfiles/win10-arm64.pubxml deleted file mode 100644 index a7fdd16b6..000000000 --- a/winrt/test.managed/Properties/PublishProfiles/win10-arm64.pubxml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - FileSystem - ARM64 - win10-arm64 - bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ - true - False - False - True - - - \ No newline at end of file diff --git a/winrt/test.managed/Properties/PublishProfiles/win10-x64.pubxml b/winrt/test.managed/Properties/PublishProfiles/win10-x64.pubxml deleted file mode 100644 index 26ea7e55c..000000000 --- a/winrt/test.managed/Properties/PublishProfiles/win10-x64.pubxml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - FileSystem - x64 - win10-x64 - bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ - true - False - False - True - - - \ No newline at end of file diff --git a/winrt/test.managed/Properties/PublishProfiles/win10-x86.pubxml b/winrt/test.managed/Properties/PublishProfiles/win10-x86.pubxml deleted file mode 100644 index 34d14d4d4..000000000 --- a/winrt/test.managed/Properties/PublishProfiles/win10-x86.pubxml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - FileSystem - x86 - win10-x86 - bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ - true - False - False - True - - - \ No newline at end of file diff --git a/winrt/test.managed/ReflectionTests.cs b/winrt/test.managed/ReflectionTests.cs index 054527a13..afa5f2357 100644 --- a/winrt/test.managed/ReflectionTests.cs +++ b/winrt/test.managed/ReflectionTests.cs @@ -10,7 +10,9 @@ namespace test.managed { - [TestClass] + // When viewed through CsWinRT, the Assembly is Microsoft.Graphics.Canvas.Interop.dll instead of + // Microsoft.Graphics.Canvas.dll, causing this test to fail. + //[TestClass] public class ReflectionTests { [TestMethod] diff --git a/winrt/test.managed/Utils.cs b/winrt/test.managed/Utils.cs index 800c29abf..003cb0a3f 100644 --- a/winrt/test.managed/Utils.cs +++ b/winrt/test.managed/Utils.cs @@ -9,6 +9,18 @@ namespace test.managed { static class Utils { + public static void AssertThrowsException(Action action) + where T : Exception + { + try + { + action(); + Assert.Fail("should throw"); + } + catch (T) + { } + } + public static void AssertThrowsException(Action action, string expectedMessage) where T : Exception { diff --git a/winrt/test.managed/winrt.test.managed.winappsdk.csproj b/winrt/test.managed/winrt.test.managed.winappsdk.csproj index 642745761..fa0b62a5d 100644 --- a/winrt/test.managed/winrt.test.managed.winappsdk.csproj +++ b/winrt/test.managed/winrt.test.managed.winappsdk.csproj @@ -1,18 +1,23 @@  WinExe - net6.0-windows10.0.19041.0 + net8.0-windows10.0.22621.0 10.0.17763.0 - 10.0.19041.55 test.managed app.manifest x86;x64;ARM64 - win10-x86;win10-x64;win10-arm64 - win10-$(Platform).pubxml + win-x86;win-x64;win-arm64 + win-$(__Platform).pubxml true true + true false false + true + Never + + + $(AssetDir)TemporaryKey.pfx @@ -36,10 +41,9 @@ - - + 3.0.2 @@ -67,8 +71,7 @@ - - + winrt.test.nativecomponent.projection AnyCPU @@ -21,11 +18,10 @@ - - + diff --git a/winrt/test.nativecomponent/packages.config b/winrt/test.nativecomponent/packages.config index 8b7a665c8..c927fd366 100644 --- a/winrt/test.nativecomponent/packages.config +++ b/winrt/test.nativecomponent/packages.config @@ -4,4 +4,6 @@ + + \ No newline at end of file diff --git a/winrt/test.nativecomponent/winrt.test.nativecomponent.uap.vcxproj b/winrt/test.nativecomponent/winrt.test.nativecomponent.uap.vcxproj index dce131bdc..bc2ac9bea 100644 --- a/winrt/test.nativecomponent/winrt.test.nativecomponent.uap.vcxproj +++ b/winrt/test.nativecomponent/winrt.test.nativecomponent.uap.vcxproj @@ -15,9 +15,9 @@ UAP NativeComponent $(ItemsRootNamespace) - 10.0.19041.0 + 10.0.22621.0 10.0.17763.0 - v143 + v145 @@ -90,11 +90,14 @@ + + + \ No newline at end of file