Giter Club home page Giter Club logo

windowsappsdk-samples's Introduction

Windows App SDK Samples

This repository hosts samples for the Windows App SDK. Samples for various features shipping in the Windows App SDK will be added to this repository. For more information about the Windows App SDK, visit the Windows App SDK Documentation. To learn more about the Windows App SDK design or to contribute to the project, make feature proposals, or start discussions, visit the Windows App SDK GitHub page.

List of samples

App Lifecycle and System Services

  • App Lifecycle: These samples demonstrate app instancing using the AppLifecycle APIs. They include the following features:
    • Activation: These samples demonstrate support for rich activation kinds.
    • Instancing: These samples demonstrate support for single and selective multi-instancing.
    • Power Notifications: These samples demonstrate the power/system state notifications for managing app workload.
    • Restart: These samples demonstrate synchronously restarting an app with command-line restart arguments.
    • Share Target: This sample demonstrates an app that can be activated as a share target.

Data and Files

  • Resource Management: These samples demonstrates app resource management using the MRT Core APIs.

Deployment

  • Deployment Manager: This sample demonstrates how to initialize and access deployment information for the Windows App SDK runtime.
  • Installer: This sample demonstrates how to launch the Windows App SDK installer without a console window.
  • Unpackaged: These samples demonstrate auto-initialization with the Windows App SDK package from non-MSIX (unpackaged) application.

Dynamic Dependencies

  • DirectX: This sample demonstrates how to use the Dynamic Dependencies API to dynamically load the DirectX Runtime MSIX framework package.

Graphics

  • Text Rendering: This sample is a gallery of the DWriteCore APIs demonstrating text rendering.

Notifications

Runtime Components

  • Custom Controls: This sample shows how to author a Windows Runtime Component in C# with custom WinUI controls.

User Interface and Input

  • Windowing: This sample demonstrates how to manage app windows using the Windowing APIs.
  • Windows Input and Composition Gallery: This collection of samples showcases Microsoft.UI.Composition and Microsoft.UI.Input APIs.
  • WinUI 3 Gallery: This is a sample app that showcases all of the WinUI 3 controls in action.

Requirements

Thes Windows App SDK samples have the following system requirements:

  • Windows 10, version 1809 (build 17763) or later.

  • Visual Studio 2022 or Visual Studio 2019 version 16.9 or later, with the following workloads and components:

    • Universal Windows Platform development
    • .NET Desktop Development (needed even if you're only building C++ Win32 apps)
    • Desktop development with C++ (needed even if you're only building .NET apps)
    • Windows SDK version 2004 (build 19041) or later. This is installed with Visual Studio by default.
  • Building .NET C# samples with Windows App SDK 1.1 also requires one of the following .NET SDK versions or later:

    • 6.0.202
    • 6.0.104
    • 5.0.407
    • 5.0.213

Refer to the docs on system requirements and tools for Windows app development for a detalied list of requirements for developing apps with the Windows App SDK.

Using the samples

To use the samples with Git, clone the WindowsAppSDK-Samples repository by running git clone https://github.com/microsoft/WindowsAppSDK-Samples.git from a command prompt. You can then navigate to the directory of a sample and open the solution file in Visual Studio.

The easiest way to use these samples without Git is to download the ZIP file. Select Download ZIP from the download dropdown, unzip the entire archive and open the samples in Visual Studio.

Samples versioning

The samples will be updated with GA releases of the Windows App SDK. The main branch includes the latest samples, which may also include experimental or preview features. Specific release branches are named release/x.y and contain samples that reference the corresponding GA version of the Windows App SDK. This repository currently includes the following release branches:

Contributing

These samples are provided by feature teams and we welcome your input on issues and suggestions for new samples. We encourage you to file a new issue for any feedback or questions!

Sample authors should follow the samples guidelines to begin developing their samples. For WinUI-based Windows App SDK samples, use the sample templates. The VSIX file is available for download in the Github releases page here.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Once a new sample app has been added, Microsoft developers shall consider updating the internal Aggregator pipeline to:

  • Enable building of the new sample app regularly.
  • Add a new test case to the existing SampleTests TAEF test driver to regularly verify successful launchng of the sample app against the latest Windows App SDK version.

Refer to the documentation on the internal Aggregator repository for instructions, in the BuildSampleApps and TestSampleApps Stages.

windowsappsdk-samples's People

Contributors

alexlamtest avatar andreww-msft avatar angelazhangmsft avatar beervoley avatar bpulliam avatar btueffers avatar dkbennett avatar eliezerpms avatar erik0686 avatar hamza-usmani avatar huichen123 avatar j0shuams avatar juan- avatar kevinguo305 avatar kmahone avatar kythant avatar loneursid avatar luanvso avatar manodasanw avatar mevey avatar microsoftopensource avatar mikebattista avatar niklasb-ms avatar rkarman avatar rohanp-msft avatar sachintamsft avatar samanthamsong avatar scottj1s avatar stevewhims avatar zenbird-zz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

windowsappsdk-samples's Issues

"Samples\Content\cpp-win32\Squares\Squares.vcxproj" doesn't configure precompiled headers correctly

"Samples\Content\cpp-win32\Squares\Squares.vcxproj" doesn't configure precompiled headers correctly, meaning that:

  1. 'pch.cpp' is compiled unnecessarily
  2. Other '.cpp' files don't benefit from precompiled headers.

Only the Debug|Win32 configuration actually specifies any precompiled header settings, and they appear to be wrong - it sets the PrecompiledHeader metadata to Create for all ClCompile items, it should be set to Use by default and Create for pch.cpp.

Without precompiled headers (i.e. as the project is currently defined) the build takes ~26 seconds on my machine. Opt-ing in to precompiled headers takes it to ~11 seconds for a full build, and incremental builds would also benefit.

Widget Icon

How can I set an icon ?
Does anynone knows ?

image

Crash in DWriteCoreGallery sample

There's a crash in the DWriteCoreGallery Sample. To reproduce:

  1. Build and launch the app
  2. Pick one of the samples
  3. Resize the window slowly* until the font selector is almost 0 width:
    image
  4. Observe crash
    image

Crash occurs here:
https://github.com/microsoft/Project-Reunion-Samples/blob/fedad5b602ddf045a0ffb37043fa79a23f787276/DWriteCore/DWriteCoreGallery/DWriteCoreGallery/ChildWindow.h#L130
Exception thrown in try/catch::
0x00a69c58 {DWriteCoreGallery.exe!void(* std::exception::vftable'[3])()} {0x00a01e41 {DWriteCoreGallery.exe!std::exception::vector deleting destructor'(unsigned int)}, ...}
Callstack:

>	DWriteCoreGallery.exe!CallMessageProcImpl<ChildWindow>(ChildWindow * obj, long(ChildWindow::*)(HWND__ *, unsigned int, unsigned int, long) proc, HWND__ * hwnd, unsigned int message, unsigned int wParam, long lParam) Line 130	C++
 	DWriteCoreGallery.exe!CallMessageProc<ChildWindow>(long(ChildWindow::*)(HWND__ *, unsigned int, unsigned int, long) proc, HWND__ * hwnd, unsigned int message, unsigned int wParam, long lParam) Line 162	C++
 	DWriteCoreGallery.exe!ChildWindow::WindowProc(HWND__ * hwnd, unsigned int message, unsigned int wParam, long lParam) Line 180	C++
 	user32.dll!__InternalCallWinProc@20๏ฟฝ()	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!___fnDWORD@4๏ฟฝ()	Unknown
 	ntdll.dll!_KiUserCallbackDispatcher@12๏ฟฝ()	Unknown
 	user32.dll!RealDefWindowProcW()	Unknown
 	uxtheme.dll!DoMsgDefault(struct _THEME_MSG const *)	Unknown
 	uxtheme.dll!OnDwpSysCommand()	Unknown
 	uxtheme.dll!_ThemeDefWindowProc()	Unknown
 	uxtheme.dll!_ThemeDefWindowProcW@16๏ฟฝ()	Unknown
 	user32.dll!DefWindowProcW()	Unknown
 	DWriteCoreGallery.exe!MainWindow::WindowProc(HWND__ * hwnd, unsigned int message, unsigned int wParam, long lParam) Line 167	C++
 	user32.dll!__InternalCallWinProc@20๏ฟฝ()	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchClientMessage()	Unknown
 	user32.dll!___fnDWORD@4๏ฟฝ()	Unknown
 	ntdll.dll!_KiUserCallbackDispatcher@12๏ฟฝ()	Unknown
 	user32.dll!RealDefWindowProcW()	Unknown
 	uxtheme.dll!DoMsgDefault(struct _THEME_MSG const *)	Unknown
 	uxtheme.dll!OnDwpNcLButtonDown()	Unknown
 	uxtheme.dll!_ThemeDefWindowProc()	Unknown
 	uxtheme.dll!_ThemeDefWindowProcW@16๏ฟฝ()	Unknown
 	user32.dll!DefWindowProcW()	Unknown
 	DWriteCoreGallery.exe!MainWindow::WindowProc(HWND__ * hwnd, unsigned int message, unsigned int wParam, long lParam) Line 167	C++
 	user32.dll!__InternalCallWinProc@20๏ฟฝ()	Unknown
 	user32.dll!UserCallWinProcCheckWow()	Unknown
 	user32.dll!DispatchMessageWorker()	Unknown
 	user32.dll!_DispatchMessageW@4๏ฟฝ()	Unknown
 	DWriteCoreGallery.exe!wWinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, wchar_t * lpCmdLine, int nCmdShow) Line 49	C++

Locals:

message=15 `WM_PAINT`
wParam=0
lParam=0
  • If you resize fast, the crash doesn't appear.

'Unable to find an entry point named 'GetWindowIdFromWindowHandle' in DLL 'Microsoft.UI.Windowing.Core.dll'.'

System.EntryPointNotFoundException
HResult=0x80131523
Message=Unable to find an entry point named 'GetWindowIdFromWindowHandle' in DLL 'Microsoft.UI.Windowing.Core.dll'.
Source=SampleApp
StackTrace:
at SampleApp.Interop.GetWindowIdFromWindowHandle(IntPtr hwnd, WindowId& result)
at SampleApp.AppWindowExtensions.GetAppWindowFromWindowHandle(IntPtr windowHandle) in \WindowsAppSDK-Samples\Samples\Windowing\cs-winui\SampleApp\WindowingInterop.cs:line 36
at SampleApp.AppWindowExtensions.GetAppWindow(Window window) in \WindowsAppSDK-Samples\Samples\Windowing\cs-winui\SampleApp\WindowingInterop.cs:line 29
at SampleApp.DemoPage.OnNavigatedTo(NavigationEventArgs e) in \WindowsAppSDK-Samples\Samples\Windowing\cs-winui\SampleApp\DemoPage.xaml.cs:line 34
at Microsoft.UI.Xaml.Controls.Page.Microsoft.UI.Xaml.Controls.IPageOverrides.OnNavigatedTo(NavigationEventArgs e)
at ABI.Microsoft.UI.Xaml.Controls.IPageOverrides.Do_Abi_OnNavigatedTo_1(IntPtr thisPtr, IntPtr e)

VS2022
WindowsAppSDK 1.0.0-preview1
SDK.NET.Ref 10.0.19041

Workaround (?) use

[DllImport("Microsoft.Internal.FrameworkUdk.dll", EntryPoint = "Windowing_GetWindowIdFromWindowHandle", CharSet = CharSet.Unicode)]
public static extern IntPtr GetWindowIdFromWindowHandle(IntPtr hwnd, out WindowId result);

instead

[DllImport("Microsoft.UI.Windowing.Core.dll", CharSet = CharSet.Unicode)]
public static extern IntPtr GetWindowIdFromWindowHandle(IntPtr hwnd, out WindowId result);

per https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/windowing/windowing-overview#samples

Proposal: More Sample Code for WinUI3 desktop app, not UWP.

Which sample are you requesting a feature to be added to?
Could we have more examples for using WinUI3 with C++/WinRT for Desktop APPs?
Currently most of them are wrote for UWP, not for desktop apps. It's very difficult for beginners to start in WinUI3 with C++/WinRT for desktop APPs.

For the sample "LowLatencyInput", I have tried 1 month to convert the sample code to Desktop APP version but always failure in debug. a lot of errors such as "read access violation". no idea what wrong with the conversion.

Describe the feature
Provide more examples for using DirectX with SwapChainPanel in C++/WinRT for Desktop APPs.
Provide a version of the sample code "LowLatencyInput" in C++/WinRT for Desktop APPs, not for UWP APPs

Simple Island App crashes on quit

If you build and run the unmodified Simple Island App, and then quit the app, it crashes.

I'm not sure if this is helpful, but here is the stack trace: Stack Trace.txt

I'm using Windows 11 23H2, Windows 11 SDK 10.0.22000.0, Visual Studio 17.8.1, and Windows App SDK 1.4.3 (1.4.231115000).

The sample cs-winui SampleApp expects the pubxml file name to be win10-x64.pubxml

Publishing fails unless "FolderProfile.pubxml" is renamed to "win10-x64.pubxml"

Actual publish profile name
C:\source\repos\cs-winui\SampleApp\Properties\PublishProfiles\FolderProfile.pubxml

Error on publish
Could not find the publish profile C:\source\repos\cs-winui\SampleApp\Properties\PublishProfiles\win10-x64.pubxml.

Bindings not found

First build of the application gives.
Severity Code Description Project File Line Suppression State
Error CS1061 'MainPage' does not contain a definition for 'Bindings' and no accessible extension method 'Bindings' accepting a first argument of type 'MainPage' could be found (are you missing a using directive or an assembly reference?) PhotoEditor C:\Projects\WindowsAppSDK-Samples-main\WindowsAppSDK-Samples-main\Samples\PhotoEditor\cs-winui\obj\x64\Debug\net6.0-windows10.0.19041.0\win10-x64\MainPage.g.cs 1066 Active

ACTION REQUIRED: Microsoft needs this private repository to complete compliance info

There are open compliance tasks that need to be reviewed for your Project-Reunion-Samples repo.

Action required: 4 compliance tasks

To bring this repository to the standard required for 2021, we require administrators of this and all Microsoft GitHub repositories to complete a small set of tasks within the next 60 days. This is critical work to ensure the compliance and security of your microsoft GitHub organization.

Please take a few minutes to complete the tasks at: https://repos.opensource.microsoft.com/orgs/microsoft/repos/Project-Reunion-Samples/compliance

  • The GitHub AE (GitHub inside Microsoft) migration survey has not been completed for this private repository
  • No Service Tree mapping has been set for this repo. If this team does not use Service Tree, they can also opt-out of providing Service Tree data in the Compliance tab.
  • No repository maintainers are set. The Open Source Maintainers are the decision-makers and actionable owners of the repository, irrespective of administrator permission grants on GitHub.
  • Classification of the repository as production/non-production is missing in the Compliance tab.

You can close this work item once you have completed the compliance tasks, or it will automatically close within a day of taking action.

If you no longer need this repository, it might be quickest to delete the repo, too.

GitHub inside Microsoft program information

More information about GitHub inside Microsoft and the new GitHub AE product can be found at https://aka.ms/gim or by contacting [email protected]

FYI: current admins at Microsoft include @EHO-makai, @Jerry-Koh, @kevinguo305, @mevey, @jesbis, @jonwis, @BenJKuhn

How to add .net library to the Win32 application

I grabbed the project cpp-win32-unpackaged and added it to the Samples\CustomControls\CsWinRTAuthoringWinUI.sln

  • added WinUIComponentCs as a dependency to the cpp-win32-unpackaged
  • added a few includes to make it compiling
  • added some stuff to the manifest file

When running app I get:
Exception thrown at 0x00007FFB44FB5B0C (KernelBase.dll) in SimpleIslandApp.exe: WinRT originate error - 0x80004005 : 'Cannot find a resource with the given key: AcrylicBackgroundFillColorDefaultBrush.'.

Here is the project
https://github.com/tomaszkot/CsWinRTAuthoringWinUI

WinForms/WPF Packaged Sample for MRTCore

Would it be possible to include an sample that shows how to use MRTCore within a WinForms and/or WPF application. Eventually this would show both packaged and unpackaged applications but for the timebeing showing how to use MRTCore in a packaged application would be great.

Unable to compile Mica-WebView2

Unable to compile a clean import of Mica-WebView2 solution.

Error MSB3231 Unable to remove directory "x64\Debug". The process cannot access the file 'MicaWebView2.log' because it is being used by another process. Mica-WebView2 F:\microsoft WindowsAppSDK-Samples main Samples-Mica\cpp-WebView2\Mica-WebView2\MicaWebView2.vcxproj 209

how to register WindowsApp runtime classes?

I have following code, it's the short version of the sample squares, it compiled, but failed with 80040154(REGDB_E_CLASSNOTREG) which means the runtime classes of WindowsApp is not registered. I've installed WindowsAppSDK 1.3 from this link. It seems that the installer did not register it. So, my question is how to register it manually?

#include <winrt/base.h>
#include <winrt/Microsoft.UI.Windowing.h>
#include <winrt/Microsoft.UI.Dispatching.h>
#include <windows.h>
#pragma comment(lib, "windowsapp")

using namespace winrt;
using namespace Microsoft::UI::Windowing;
using namespace Microsoft::UI::Dispatching;
/*
cl /nologo /EHsc /Zi /std:c++latest /Iapiexp/winui3 winui3.cpp /link /subsystem:console /debug
*/
int WinMain(HINSTANCE,HINSTANCE,PSTR,int) {
  winrt::init_apartment(winrt::apartment_type::single_threaded);
  try {
    auto appWindow = AppWindow::Create();
    appWindow.Title(L"Squares");
    appWindow.Show();

    auto ctl = DispatcherQueueController::CreateOnCurrentThread();
    auto queue = ctl.DispatcherQueue();
    queue.RunEventLoop();
  } catch(hresult_error e) {
    printf("winui3 0x%x\n",int32_t(e.code()));
  }
}

int main() {
  return WinMain(nullptr,nullptr,nullptr,0);
}

Mica Sample: cpp-win32 builds but fails to run!

Have reviewed the previous issue with this sample(#245) and have loaded the required run time as suggested:

Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x86__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Main.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe
MicrosoftCorporationII.WinAppRuntime.Singleton_2000.707.2303.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x6_2000.707.2303.0_x64__8wekyb3d8bbwe
Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x8_2000.707.2303.0_x86__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.1_1005.616.1651.0_x86__8wekyb3d8bbwe
Microsoft.WindowsAppRuntime.1.1_1005.616.1651.0_x64__8wekyb3d8bbwe

running in Windows 10 with VS2022 Version 17.4.4, App cloned from Github
.
The App builds without any errors or warnings but fails to load, below is a copy of the Output when running in debug:

'WinAppSDKMicaSample.exe' (Win32): Loaded 'E:\Dev\Visual Studio 2022\repos\WindowsAppSDK-Samples\Samples\Mica\cpp-win32\x64\Debug\WinAppSDKMicaSample.exe'. Symbols loaded.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ntdll.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\kernel32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\KernelBase.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\user32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\win32u.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\gdi32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\gdi32full.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\msvcp_win.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbase.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ole32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\rpcrt4.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\combase.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'E:\Dev\Visual Studio 2022\repos\WindowsAppSDK-Samples\Samples\Mica\cpp-win32\x64\Debug\Microsoft.WindowsAppRuntime.Bootstrap.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\oleaut32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\CoreMessaging.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\msvcrt.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\advapi32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ws2_32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\sechost.dll'.
'WinAppSDKMicaSample.exe' (Win32): Unloaded 'C:\Windows\System32\sechost.dll'
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\shell32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140d.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\vcruntime140_1d.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ucrtbased.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\msvcp140d.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\imm32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\bcryptprimitives.dll'.
\BuildOutput\Release\x64\WindowsAppRuntime_DLL\WindowsAppRuntimeInsights.h(53)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D870ED3: (caller: 00007FF96D870BF4) LogHr(1) tid(4d20) 8007007E The specified module could not be found.
Msg:[Unable to load resource dll. Microsoft.WindowsAppRuntime.Insights.Resource.dll]
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\kernel.appcore.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\clbcatq.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\AppXDeploymentClient.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\Windows.ApplicationModel.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\SHCore.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\twinapi.appcore.dll'.
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(814)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D869F04: (caller: 00007FF96D868BB1) LogHr(2) tid(4d20) 80040010 Object is not in any of the inplace active states
Msg:[Bootstrap.Intitialize: Scanning packages for Major.Minor=1.2, Tag=, MinVersion=2000.677.1750.0] CallContext:[\Initialize]
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryCore.dll'.
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(923)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D86A81A: (caller: 00007FF96D868BB1) LogHr(3) tid(4d20) 80040012 Not able to perform the operation because object is not given storage yet
Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x6_2000.707.2303.0_x64__8wekyb3d8bbwe is applicable (Major.Minor=1.2, Tag=, MinVersion=2000.677.1750.0)] CallContext:[\Initialize]
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(914)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D86A7B2: (caller: 00007FF96D868BB1) LogHr(4) tid(4d20) 80040011 Not able to convert object
Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x8_2000.707.2303.0_x86__8wekyb3d8bbwe not applicable. Architecture doesn't match current architecture x64 (Major.Minor=1.2, Tag=, MinVersion=2000.677.1750.0)] CallContext:[\Initialize]
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(946)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D86ABB2: (caller: 00007FF96D868BB1) LogHr(5) tid(4d20) 80040013 Msg:[Bootstrap.Intitialize: Microsoft.WinAppRuntime.DDLM.2000.707.2303.0-x6_2000.707.2303.0_x64__8wekyb3d8bbwe best matches the criteria (Major.Minor=1.2, Tag=, MinVersion=2000.677.1750.0) of 252 packages scanned] CallContext:[\Initialize]
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\twinui.appcore.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\windows.storage.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\wldp.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\OneCoreUAPCommonProxyStub.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\daxexec.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\fltLib.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\container.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\profapi.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\IPHLPAPI.DLL'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\usermgrcli.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\twinui.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\WinTypes.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\powrprof.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\dwmapi.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\pdh.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\umpdc.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\Windows.StateRepositoryPS.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\LicenseManagerApi.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\capauthz.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\wintrust.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\crypt32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\msasn1.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\ntmarta.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\shlwapi.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\uxtheme.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\propsys.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\cfgmgr32.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\Windows.FileExplorer.Common.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\iertutil.dll'.
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF9624FFCC8) ReturnHr(1) tid(32d0) 8000000B The operation attempted to access data outside the valid range
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF9624FFFE3) ReturnHr(2) tid(32d0) 8000000B The operation attempted to access data outside the valid range
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF9624FFCC8) ReturnHr(3) tid(32d0) 8000000B The operation attempted to access data outside the valid range
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF9625002C1) ReturnHr(4) tid(32d0) 8000000B The operation attempted to access data outside the valid range
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF96250059D) ReturnHr(5) tid(32d0) 8000000B The operation attempted to access data outside the valid range
onecoreuap\internal\shell\inc\private\StateRepoUtil.h(40)\Windows.FileExplorer.Common.dll!00007FF9624FB501: (caller: 00007FF9624FFFE3) ReturnHr(6) tid(32d0) 8000000B The operation attempted to access data outside the valid range
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\edputil.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\urlmon.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\srvcli.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\netutils.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\cldapi.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\bcrypt.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\sspicli.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\AppResolver.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\slc.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\userenv.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\BCP47Langs.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\sppc.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\OneCoreCommonProxyStub.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\mpr.dll'.
'WinAppSDKMicaSample.exe' (Win32): Loaded 'C:\Windows\System32\execmodelproxy.dll'.
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(373)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D8680CF: (caller: 00007FF96D8671DB) Exception(1) tid(4d20) 80070005 Access is denied.
Msg:[Error in LoadLibrary: 5 (0x5) loading C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.WindowsAppRuntime.dll] CallContext:[\Initialize]
Exception thrown at 0x00007FF999C6CD29 in WinAppSDKMicaSample.exe: Microsoft C++ exception: wil::ResultException at memory location 0x0000000737F2CBD0.
Exception thrown at 0x00007FF999C6CD29 in WinAppSDKMicaSample.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(213)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D87BB71: (caller: 00007FF96D866E09) ReturnHr(1) tid(4d20) 80070005 Access is denied.
Msg:[\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(373)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D8680CF: (caller: 00007FF96D8671DB) Exception(1) tid(4d20) 80070005 Access is denied.
Msg:[Error in LoadLibrary: 5 (0x5) loading C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.2_2000.707.2303.0_x64__8wekyb3d8bbwe\Microsoft.WindowsAppRuntime.dll] CallContext:[\Initialize]
] CallContext:[\Initialize]
\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(166)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FF96D866EF7: (caller: 00007FF777D5515C) ReturnHr(2) tid(4d20) 80070005 Access is denied.
CallContext:[\Initialize]
The thread 0x32d0 has exited with code 2147942405 (0x80070005).
The thread 0x4a00 has exited with code 2147942405 (0x80070005).
The thread 0x3210 has exited with code 2147942405 (0x80070005).
The thread 0x3e08 has exited with code 2147942405 (0x80070005).
The thread 0x25c has exited with code 2147942405 (0x80070005).
The thread 0x4df0 has exited with code 2147942405 (0x80070005).
The thread 0x3264 has exited with code 2147942405 (0x80070005).
The thread 0x2c18 has exited with code 2147942405 (0x80070005).
The thread 0x6c8 has exited with code 2147942405 (0x80070005).
The thread 0x448c has exited with code 2147942405 (0x80070005).
The program '[0x1E9C] WinAppSDKMicaSample.exe' has exited with code 2147942405 (0x80070005).

Project references not resloved in a WinUI 3 C++ project

In the project PhotoEditor, why is there exclamation mark in the Reference, prompting "..... references could not be resolved"

The steps to reproduce are as follows

  1. Download this sample https://github.com/microsoft/WindowsAppSDK-Samples.git.
  2. Open WindowsAppSDK-Samples/Samples/PhotoEditor/cpp-winui/PhotoEditor.sln , then the references may be empty.
  3. Rebuild the project, close PhotoEditor.sln, and then reopen it.
  4. Check the references, you will find exclamation mark prompt.
  5. But if you choose the Microsoft.WindowsAppSDK version to 1.0.4, there is no exclamation mark.

My Visual Studio version:Visual Studio Community 2022 17.3.4.

This question comes from Microsoft Q&A (Project references in a WinUI 3 C++ project) and I would like to know how this problem can be solved.

InkedMicrosoftTeams-image (2)_LI

Standalone WinUI C++ or with XAML anyway

Hello,

I'm interested in C++ GUI but the default option to create C++ GUI in Visual Studio is really worse (longer to update and implement new stuff) while WinUI for example use XAML so I seen you can completely export as normal executable but it does give a lot of DLLs and Folders next to it, I wonder if it's possible to achieve the same but with a standalone executable
instead ?

Because the really minimal I can go to is this..

Regards.

Windowing - TitleBar sample - Titlebar always null

If we navigate to the 'Titlebar' page, pressing any of the three buttons results in a null ref exception:

image

Code is unaltered & run from fresh clone of this repo.

WinUI project.

I note you refer to this as being fixed in #71 and #94 but it doesnt seem to be @samanthamsong, can you provide any guidance?

cs-winforms-unpackaged doesn't check MddBootstrap.Initialize() return code

WindowsAppSDK-Samples/Samples/ResourceManagement/cs-winforms-unpackaged/Program.cs line 25

MddBootstrap.Initialize(8, "preview");

doesn't check the return code. Failures will slide by undetected and calls to other APIs will fail (and likely crash) e.g. if the MSIX packages aren't registered WinRT activations will fail due to E_CLASSDB_NOT_REGISTERED. This needs to be something like

int hr = MddBootstrap.Initialize(8, "preview");
if (hr < 0)
    โ€ฆerrorโ€ฆ

Dynamic Dependencies sample does not build correctly

The following sample:
https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/DynamicDependencies/DirectX

shoes the following error when building:
1>C:\WindowsAppSDK-Samples\Samples\DynamicDependencies\DirectX\D3D9ExSample.cpp(13,10): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
1>C:\WindowsAppSDK-Samples\Samples\DynamicDependencies\DirectX\BackgroundThread.cpp(12,10): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory

Might there be an issue with the sample?

WinUI 3 controls in Simple Island App are invisible until focused

Building and running the unmodified Simple Island App project results in a window that looks like this:

Screenshot 2023-11-26 142726

However, there are suposed to be WinUI 3 controls on the top and bottom of the WebView2. The XAML has:

    <Grid Padding="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="50"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="50"/>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0">
            <Button x:Name="Button" Click="ClickHandler">Click Me</Button>
            <TextBox Text="Text goes here" Margin="10" />
        </StackPanel>
        <WebView2 Grid.Row="1" Source="http://bing.com" />
        <Button Grid.Row="2">Last Button</Button>
    </Grid>

So there are supposed to be a Button and TextBox above the WebView2, and another Button below it.

If you click where the TextBox control is supposed to be, it shows up:

Screenshot 2023-11-26 143327

But then if you click away from it, it disappears again.

I'm using Windows 11 23H2, Windows 11 SDK 10.0.22000.0, Visual Studio 17.8.1, and Windows App SDK 1.4.3 (1.4.231115000).

Unable to Restart WinUI Unpackaged application (C#)

Issue Description:

Unable to restart the WinUI 3 unpackaged application. Getting 'System.IO.FileNotFoundException' in WinRT.Runtime.dll when calling the AppInstance.Restart("");. where as, the application is restarting properly in Packaged application.

.csproj file

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>WinExe</OutputType>
    <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
    <TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
    <RootNamespace>RestartTest</RootNamespace>
    <ApplicationManifest>app.manifest</ApplicationManifest>
    <Platforms>x86;x64;arm64</Platforms>
    <RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
    <PublishProfile>win10-$(Platform).pubxml</PublishProfile>
    <UseWinUI>true</UseWinUI>
    <SelfContained>true</SelfContained>
    <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>
    <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
  </PropertyGroup>

  <ItemGroup>
    <Content Include="Assets\SplashScreen.scale-200.png" />
    <Content Include="Assets\LockScreenLogo.scale-200.png" />
    <Content Include="Assets\Square150x150Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.scale-200.png" />
    <Content Include="Assets\Square44x44Logo.targetsize-24_altform-unplated.png" />
    <Content Include="Assets\StoreLogo.png" />
    <Content Include="Assets\Wide310x150Logo.scale-200.png" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Microsoft.WindowsAppSDK" Version="1.1.3" />
    <PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.1" />
    <Manifest Include="$(ApplicationManifest)" />
  </ItemGroup>

  <!-- Defining the "Msix" ProjectCapability here allows the Single-project MSIX Packaging
       Tools extension to be activated for this project even if the Windows App SDK Nuget
       package has not yet been restored -->
  <ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnablePreviewMsixTooling)'=='true'">
    <ProjectCapability Include="Msix" />
  </ItemGroup>
</Project>

Windows App SDK : 1.1.3
Windows Version: 10.0.19044

Sample Application to Reproduce

Proposal: DWriteCore example in C# & xaml

As a hobby C#/.NET developer coming from UWP, I understand exactly nothing regarding the "Text Rendering" capability of Project Reunion. I thought C# & xaml is pretty much the standard way to develop new apps for Windows? Both the online documentation and this TextRendering example are quite incomprehensible for me.
Please add an example written in C# & xaml, so that it is more readable and understandable!

Mica win32-cpp example fails to run

The program compiles fine (amd64, VS 2022) but fails while loading libraries

D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(645)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFA06324BBD: (caller: 00007FFA0632244F) Exception(1) tid(db64) 80070491 There was no match for the specified key in the index.
    Msg:[Enumeration: Major=1, Minor=0, Tag=, MinVersion=0.319.455.0] 
D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(125)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFA06333D61: (caller: 00007FF6B23E1050) ReturnHr(1) tid(db64) 80070491 There was no match for the specified key in the index.
    Msg:[D:\a\_work\1\s\dev\WindowsAppRuntime_BootstrapDLL\MddBootstrap.cpp(645)\Microsoft.WindowsAppRuntime.Bootstrap.dll!00007FFA06324BBD: (caller: 00007FFA0632244F) Exception(1) tid(db64) 80070491 There was no match for the specified key in the index.
    Msg:[Enumeration: Major=1, Minor=0, Tag=, MinVersion=0.319.455.0] 
] 
Exception thrown at 0x00007FFA8023FAEC in WinAppSDKMicaSample.exe: Microsoft C++ exception: wil::ResultException at memory location 0x0000004E2D6FC7D0.
Exception thrown at 0x00007FFA8023FAEC in WinAppSDKMicaSample.exe: Microsoft C++ exception: [rethrow] at memory location 0x0000000000000000.
The thread 0x8f0 has exited with code 2147943569 (0x80070491).
The thread 0xc8dc has exited with code 2147943569 (0x80070491).
The thread 0xc818 has exited with code 2147943569 (0x80070491).
The program '[34592] WinAppSDKMicaSample.exe' has exited with code 2147943569 (0x80070491).

Convert the CustomEditControl sample to WindowsAppSDK

Which sample are you requesting?

CustomEditControl sample originally found at https://github.com/microsoft/Windows-universal-samples/tree/main/Samples/CustomEditControl

Describe the feature

The old sample worked fine in UWP, but it used some classes like CoreTextServicesManager that are not available in WinUI 3 (see docs at https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-supported-api).

If we want our biggest customers to migrate to WindowsAppSDK, we need to convert this sample showing how to achieve the same result.

Samples\Windowing\cpp\cpp-winui custom title bar crash

Select the titlebar twice and use the minimize and maximize buttons in the custom status bar to crash. The void* value{} in TitleBar() is empty.

In

void TitlebarPage::SetCustomTitleBarDragRegion()
   {
      int titleBarHeight = m_appWindow.TitleBar().Height(); 
    }

  template <typename D> auto consume_Microsoft_UI_Windowing_IAppWindow<D>::TitleBar() const
  {
      void* value{};//Empty
      check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::UI::Windowing::IAppWindow)->get_TitleBar(&value));// &value 0xFFFFFFFFFFFFFFFF 
      return winrt::Microsoft::UI::Windowing::AppWindowTitleBar{ value, take_ownership_from_abi };
  }

'SampleApp.exe' (Win32): 'C:\Windows\System32\ninput.dll' has been loaded.
'SampleApp.exe' (Win32): Loaded 'C:\Program Files\WindowsApps\Microsoft.WindowsAppRuntime.1.5_5001.70.1338.0_x64__8wekyb3d8bbwe\Microsoft.UI.Xaml.Phone.dll'.
Natvis C++/WinRT: Exception in
...
cppwinrt_visualizer::EvaluateVisualizedExpression
Exception thrown at 0x00007FF6CFFF7645 (in SampleApp.exe): 0xC0000005: An access violation occurred while reading location 0xFFFFFFFFFFFFFFFF.

ResourceManagement of text in XAML

The ResourceManagement sample does not show the most common WinUI 3 case for localization: Strings in XAML files.

I was wondering how to use MRT Core with x:Uid attributes. The existence of the two resource systems has me pretty confused.

Should I just stay with "Windows.ApplicationModel.Resources.ResourceLoader"?

More Sample Code for WinUI3 desktop app, not UWP.

Which sample are you requesting a feature to be added to?

Could we have more examples for using WinUI3 with C++/WinRT for Desktop APPs?
Currently most of them are wrote for UWP, not for desktop apps. It's very difficult for beginners to start in WinUI3 with C++/WinRT for desktop APPs.

For the sample code "LowLatencyInput", I have tried 1 month to convert the sample code to Desktop APP version but always failure in debug. a lot of errors such as "read access violation". no idea what's wrong with the conversion.

Describe the feature

Provide more examples for using DirectX with SwapChainPanel in C++/WinRT for Desktop APPs.
Provide a version of the sample code "LowLatencyInput" in C++/WinRT for Desktop APPs, not for UWP APPs

Sample for AppWindow without UI

Hi,

I'm looking for some sample code on setting up a basic Window without any UI, connecting AppWindow to DirectX. Is this available yet? If not, can we expect it next month?

Unable to publish via ClickOnce for Unpackaged app

From Unpackaged example

  • OS: Windows 11
  • IDE: VS 2022 Community
  • Installed Windows App SDK extensions

Code changes:

  • i update my target framework from .net-5* to .net-6* because i'm not installed .net-5x yet
  • i created a new ClickOnce's Publish Profile via Publish wizard:
<!-- file: WindowsAppSDK-Samples\Samples\Unpackaged\cs-console-unpackaged\Properties\PublishProfiles\ClickOnceProfile.pubxml -->
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121. 
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ApplicationRevision>0</ApplicationRevision>
    <ApplicationVersion>1.0.0.*</ApplicationVersion>
    <BootstrapperEnabled>True</BootstrapperEnabled>
    <Configuration>Release</Configuration>
    <CreateWebPageOnPublish>False</CreateWebPageOnPublish>
    <GenerateManifests>True</GenerateManifests>
    <Install>True</Install>
    <InstallFrom>Disk</InstallFrom>
    <IsRevisionIncremented>True</IsRevisionIncremented>
    <IsWebBootstrapper>False</IsWebBootstrapper>
    <MapFileExtensions>True</MapFileExtensions>
    <OpenBrowserOnPublish>False</OpenBrowserOnPublish>
    <Platform>x64</Platform>
    <PublishDir>bin\publish-clickonce\</PublishDir>
    <PublishUrl>bin\publish-clickonce\</PublishUrl>
    <PublishProtocol>ClickOnce</PublishProtocol>
    <PublishReadyToRun>False</PublishReadyToRun>
    <PublishSingleFile>False</PublishSingleFile>
    <RuntimeIdentifier>win-x64</RuntimeIdentifier>
    <SelfContained>False</SelfContained>
    <SignatureAlgorithm>(none)</SignatureAlgorithm>
    <SignManifests>False</SignManifests>
    <TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
    <UpdateEnabled>False</UpdateEnabled>
    <UpdateMode>Foreground</UpdateMode>
    <UpdateRequired>False</UpdateRequired>
    <WebPageFileName>Publish.html</WebPageFileName>
  </PropertyGroup>
  <ItemGroup>
    <BootstrapperPackage Include="Microsoft.NetCore.DesktopRuntime.6.0.x64">
      <Install>True</Install>
      <ProductName>.NET Desktop Runtime 6.0.0 (x64)</ProductName>
    </BootstrapperPackage>
  </ItemGroup>
</Project>

Publish exception output:

Build started...
1>------ Build started: Project: Unpackaged, Configuration: Release x64 ------
Restored D:\WindowsAppSDK-Samples\Samples\Unpackaged\cs-console-unpackaged\Unpackaged.csproj (in 20 ms).
1>Unpackaged -> D:\WindowsAppSDK-Samples\Samples\Unpackaged\cs-console-unpackaged\bin\x64\Release\net6.0-windows10.0.19041.0\Unpackaged.dll
2>------ Publish started: Project: Unpackaged, Configuration: Release x64 ------
2>Determining projects to restore...
2>All projects are up-to-date for restore.
2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\Roslyn\csc.exe /noconfig /unsafe- /checked- /nowarn:1701,1702,1701,1702,2008 /fullpaths /nostdlib+ /platform:x64 /errorreport:prompt /warn:6 /define:TRACE;RELEASE;NET;NET6_0;NETCOREAPP;WINDOWS;WINDOWS10_0_19041_0;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER;WINDOWS10_0_19041_0_OR_GREATER;WINDOWS10_0_18362_0_OR_GREATER;WINDOWS10_0_17763_0_OR_GREATER;WINDOWS8_0_OR_GREATER;WINDOWS7_0_OR_GREATER /errorendlocation /preferreduilang:en-US /highentropyva+ /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\Microsoft.CSharp.dll" /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.InteractiveExperiences.Projection.dll /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\Microsoft.VisualBasic.Core.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\Microsoft.VisualBasic.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\Microsoft.Win32.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\Microsoft.Win32.Registry.dll" /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.Resources.Projection.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.WindowsAppRuntime.Projection.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.Windows.AppLifecycle.Projection.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.21\lib\Microsoft.Windows.SDK.NET.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.Windows.System.Power.Projection.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.WindowsAppRuntime.Bootstrap.Net.dll /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\lib\net5.0-windows10.0.18362.0\Microsoft.WinUI.dll /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\mscorlib.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\netstandard.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.AppContext.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Buffers.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Collections.Concurrent.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Collections.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Collections.Immutable.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Collections.NonGeneric.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Collections.Specialized.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.Annotations.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.DataAnnotations.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.EventBasedAsync.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ComponentModel.TypeConverter.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Configuration.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Console.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Core.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Data.Common.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Data.DataSetExtensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Data.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.Contracts.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.Debug.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.DiagnosticSource.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.FileVersionInfo.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.Process.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.StackTrace.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.TextWriterTraceListener.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.Tools.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.TraceSource.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Diagnostics.Tracing.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Drawing.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Drawing.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Dynamic.Runtime.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Formats.Asn1.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Globalization.Calendars.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Globalization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Globalization.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Compression.Brotli.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Compression.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Compression.FileSystem.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Compression.ZipFile.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.FileSystem.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.FileSystem.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.FileSystem.DriveInfo.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.FileSystem.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.FileSystem.Watcher.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.IsolatedStorage.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.MemoryMappedFiles.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Pipes.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.Pipes.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.IO.UnmanagedMemoryStream.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Linq.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Linq.Expressions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Linq.Parallel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Linq.Queryable.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Memory.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Http.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Http.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.HttpListener.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Mail.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.NameResolution.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.NetworkInformation.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Ping.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Requests.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Security.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.ServicePoint.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.Sockets.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.WebClient.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.WebHeaderCollection.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.WebProxy.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.WebSockets.Client.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Net.WebSockets.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Numerics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Numerics.Vectors.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ObjectModel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.DispatchProxy.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Emit.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Emit.ILGeneration.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Emit.Lightweight.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Metadata.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Reflection.TypeExtensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Resources.Reader.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Resources.ResourceManager.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Resources.Writer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.CompilerServices.Unsafe.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.CompilerServices.VisualC.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Handles.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.InteropServices.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.InteropServices.RuntimeInformation.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Intrinsics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Loader.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Numerics.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Serialization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Serialization.Formatters.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Serialization.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Serialization.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Runtime.Serialization.Xml.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.AccessControl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Claims.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.Algorithms.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.Cng.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.Csp.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.Encoding.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.OpenSsl.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.Primitives.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Cryptography.X509Certificates.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Principal.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.Principal.Windows.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Security.SecureString.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ServiceModel.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ServiceProcess.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.Encoding.CodePages.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.Encoding.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.Encoding.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.Encodings.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.Json.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Text.RegularExpressions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Channels.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Overlapped.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Tasks.Dataflow.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Tasks.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Tasks.Extensions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Tasks.Parallel.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Thread.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.ThreadPool.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Threading.Timer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Transactions.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Transactions.Local.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.ValueTuple.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Web.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Web.HttpUtility.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Windows.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.Linq.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.ReaderWriter.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.Serialization.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.XDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.XmlDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.XmlSerializer.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.XPath.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\System.Xml.XPath.XDocument.dll" /reference:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\ref\net6.0\WindowsBase.dll" /reference:C:\Users\ConChimNon\.nuget\packages\microsoft.windows.sdk.net.ref\10.0.19041.21\lib\WinRT.Runtime.dll /debug- /debug:portable /filealign:512 /nowin32manifest /optimize+ /out:obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\Unpackaged.dll /refout:obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\ref\Unpackaged.dll /subsystemversion:6.00 /target:exe /warnaserror- /utf8output /deterministic+ /langversion:10.0 /analyzerconfig:"D:\WindowsAppSDK-Samples\.editorconfig" /analyzerconfig:obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\Unpackaged.GeneratedMSBuildEditorConfig.editorconfig /analyzerconfig:"C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\analyzers\build\config\analysislevel_6_default.editorconfig" /analyzer:"C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" /analyzer:"C:\Program Files\dotnet\sdk\6.0.100\Sdks\Microsoft.NET.Sdk\targets\..\analyzers\Microsoft.CodeAnalysis.NetAnalyzers.dll" /analyzer:"C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Ref\6.0.0\analyzers/dotnet/cs/System.Text.Json.SourceGeneration.dll" Program.cs "obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\.NETCoreApp,Version=v6.0.AssemblyAttributes.cs" C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\build\..\include\MddBootstrapAutoInitializer.cs C:\Users\ConChimNon\.nuget\packages\microsoft.windowsappsdk\1.0.0\build\..\include\WindowsAppSDK-VersionInfo.cs obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\Unpackaged.AssemblyInfo.cs /warnaserror+:NU1605
2>Could not copy the file "D:\WindowsAppSDK-Samples\Samples\Unpackaged\cs-console-unpackaged\obj\x64\Release\net6.0-windows10.0.19041.0\win-x64\apphost.exe" to the destination file "bin\x64\Release\net6.0-windows10.0.19041.0\win-x64\", because the destination is a folder instead of a file. To copy the source file into a folder, consider using the DestinationFolder parameter instead of DestinationFiles.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Publish: 0 succeeded, 1 failed, 0 skipped ==========

I can publish this application via Folder method but i would like to create an installer as other win32 application, please tell me how do i can resolve this issue.
Thanks.

Sample cs-winui miss languages after it is published as a package

Hello,
When I run the sample cs-winui ( https://github.com/microsoft/WindowsAppSDK-Samples/tree/main/Samples/ResourceManagement/cs-winui) in Visual Studio (mine is VS 2019) - after clicking "Override Language" button, I can see the German text is displayed as expected.

image

However, after I publish it as a sideloading package and install it - right click on package project, select Publish > Create App Packages ... .
image

When I click "Override Language" button, it shows me the text in English.
image

It seems that resources in German is gone after packaging. Is this a bug or any additional configuration is needed ? And if this is a known issue, is there any workaround I could apply?

Hello World MSIX SignTool Error: File not found

Describe the bug

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Pull fresh repo from ProjectReunion sample apps
  2. Load HelloWorld sample in VS2019 Preview.
  3. Clean/Build and verify working on local machine
  4. Replace certificate with local cert.
  5. Publish app package to test install on local machine through VS2019 Preview.

Expected behavior

I expected the MSIX bundle to be signed and ready to install in the target output path.

Screenshots

image

Version Info

NuGet package version:

Microsoft.ProjectReunion 0.1.0

Most recent build on my dev box.

Additional context

DirectWriteCore.dll not found

I cannot run text rendering sample, it complains about DirectWriteCore.dll not found when I try to run it after building.

Pinning widget after deploy rise NullReferenceException

After first deploy, try to pin the widget. The console app will open and rise null exception in this line:

foreach (var widgetInfo in widgetManager.GetWidgetInfos())

then will be called Activate method and trow error Activate called for unknown:

After killing widget.exe process two times (Exactly twice, once is not enough) the error always goes away.

Need sample to use Microsoft.WindowsAppSDK 1.0.0-experimental1

Hi team,
I want to use Microsoft.WindowsAppSDK 1.0.0-experimental1 in my current library (which used WinUI 0.8 packages).
But right after installing Microsoft.WindowsAppSDK 1.0.0-experimental1, my project fails with
Severity Code Description Project File Line Suppression State Error NETSDK1022 Duplicate 'Page' items were included. The .NET SDK includes 'Page' items from your project directory by default. You can either remove these items from your project file, or set the 'EnableDefaultPageItems' property to 'false' if you want to explicitly include them in your project file. For more information, see https://aka.ms/sdkimplicititems. The duplicate items were: 'MainWindow.xaml' InputHandling C:\Users\hansnguyen\.nuget\packages\microsoft.windowsappsdk.winui\1.0.0-experimental1\buildTransitive\Microsoft.WinUI.targets 54
This error can be fixed wtih explicitly adding EnableDefaultPageItems to csproj file.

But after that, my sample app shows another error when compile
Severity Code Description Project File Line Suppression State Error WMC1012 A project cannot have more than one ApplicationXaml item InputHandling C:\Works\c1-netcore\WinUI\Samples\Core\InputHandling\InputHandling\InputHandling.csproj 1
This time, I haven't been able to find a fix yet.

I'm building with VS2022 Version 17.0.0 Preview 4.0 and VS2019 Version 16.11.3. Both failing.
Are there anything I missed setup in csproj file? I appreciate if WinUI team can upload a working sample for using Microsoft.WindowsAppSDK 1.0.0-experimental1 package. Thanks!

Recommend using #region in samples to comment the code

Add guidelines/recommendations for sample authors to use #region to mark their code so that customers can easily find the right places to go to. In Visual Studio you can expand/minimize the regions to view the code in each section.

For example: #region Constructor, lifecycle and navigation

image

MIssing DLL for Restart ??

I downloaded the Samples and built the Restart / cs-winui-packaged project. But it could not deploy, I got a message saying that a dll could not be copied, Microsoft.Windows.ApplicaitonModel.DynamicDependency.Projection.dll.

The directory is there, it's the DLL that's missing. Where is it supposed to come from?
What am I missing, do I need a nuget package of some kind?

Exact message is:
Error DEP1000: Cannot copy file "C:\Users\steve.nuget\packages\microsoft.windowsappsdk\1.2.221109.1\lib\net6.0-windows10.0.18362.0\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll" to layout "C:\Users\steve\OneDrive\Documents\VS Projects\WindowsAppSDK-Samples-main\Samples\AppLifecycle\Restart\cs-winui-packaged\cs-winui-packaged\bin\x64\Debug\net6.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll". DirectoryNotFoundException - Could not find a part of the path 'C:\Users\steve\OneDrive\Documents\VS Projects\WindowsAppSDK-Samples-main\Samples\AppLifecycle\Restart\cs-winui-packaged\cs-winui-packaged\bin\x64\Debug\net6.0-windows10.0.19041.0\win10-x64\AppX\Microsoft.Windows.ApplicationModel.DynamicDependency.Projection.dll'.

[0x80070003] cs-winui-packaged

Thanks

About the self-starting function registration of the application

Uwp has the registration of the following self-starting functions. Can someone write a demo of the wasdk version? Contains packaged and unpackaged projects.

<Package ...>
...

<Application ...>
...

<desktop:Extension Category="windows.startupTask">
desktop:StartupTasks
<desktop:StartupTask TaskId="MyTask" Enabled="true" DisplayName="My App"/>
</desktop:StartupTasks>
</desktop:Extension>



AppWindow.TitleBar returned null

Issue 1: Microsoft.UI.Windowing.AppWindow.TitleBar.get returned null.

Issue 2: windowConfiguration.HasTitleBar True -> False works, False -> True no effect

(This repo is mentioned in the 'official' msft documentation but it uses WindowsAppSDK preview version, are those only a guidance and not really working examples until official release?)

DeploymentManager CSharp Sample Getting COM Execeptions

I'm getting the following errors with the DeploymentManager sample:
Are these APIs, working properly, or is there an issue with the sample?

Scenario 1: GetStatus:
Result Status: PackagelnstallRequired
Result ExtendedError. System.Runtime.lnteropServices.COMException (Ox80070490): Element not found. (Ox80070490)

Scenario 2: Initialize:
Result Status: PackagelnstallFailed
Result ExtendedError. System.Runtime.lnteropServices.COMException (Ox800700E8): The pipe is being closed. (Ox800700E8)
Initialize() failed to ensure the WindowsAppRuntime.

@dkbennett @angelazhangmsft

PushNotifications sample says to request WNS channel using Azure AppId instead of Azure ObjectId

Both of the following documents say to use the Azure AppId to request a WNS push notification channel:

However, the Push Notifications quick start says that the Azure AppId should be used for the server-side push notification registration and that the Azure ObjectId should be used to request a WNS push notification channel:

Which one of these is the correct? We have been successful using the Azure ObjectID to request a channel on the client, but I am a little nervous that this may break in the future as requesting a channel using the Azure AppID seems to return a channel Uri as well.

I didn't want to cross-post this issue to both repos, but perhaps this should also be posted as an issue on https://github.com/MicrosoftDocs?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.