page_type | languages | products | name | urlFragment | description | extendedZipContent | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
|
|
Unpackaged App Sample |
Unpackaged |
Demonstrate how to use the Windows App SDK in non-MSIX (unpackaged) application. |
|
These samples demonstrate how simple it is to use the Windows App SDK from a non-MSIX (unpackaged) application using the auto-intialization that is part of the Windows App SDK NuGet package.
- Basic - C++ - Console app sample showing how to set a project property that initializes access to the Windows App SDK and call a simple API.
- Basic - C# - Console app sample showing how to set a project property that initializes access the Windows App SDK and call a simple API.
When using the Windows App SDK in an unpackaged app, the developer needs to add a PackageReference
to the Windows App SDK NuGet and set <WindowsPackageType>None</WindowsPackageType>
in the project file. This property tells the build system to auto-initialize the framework package for use with the app using module initializers in both C# and C++. If developers want more control over the initialization, they can explicitly call the Bootstrapper APIs to initialize the framework package. See Referencing the Windows App SDK framework package at run time.
- See System requirements for Windows app development.
- Make sure that your development environment is set up correctly—see Install tools for developing apps for Windows 10 and Windows 11.
- Since these samples are unpackaged, make sure to also install the prerequisites for deploying unpackaged apps to ensure that the appropriate MSIX dependencies are installed.
- Open the solution file (
.sln
) from the subfolder of your preferred sample in Visual Studio. - From Visual Studio, either Start Without Debugging (Ctrl+F5) or Start Debugging (F5).