There is the source code at : https://github.com/microsoft/WindowsAppSDK/tree/main/dev/WindowsAppRuntime_BootstrapDLL
WinUI3 : How to link Microsoft.WindowsAppRuntime.Bootstrap.lib statically to winui project
Hi,
I am working on a WinUi desktop project in cpp with cmake. When we create Winui3 app in unpackaged mode, the debug folder looks like this
Here it generated Microsoft.WindowsAppRuntime.Bootstrap.dll file which gets linked dynamically, so I can't move the exe to a different location and run it. I wanted to link this lib statically. I would be of great help if you could help me solve this issue
Windows App SDK
1 additional answer
Sort by: Most helpful
-
Jeanine Zhang-MSFT 11,351 Reputation points Microsoft External Staff
2023-04-20T06:46:12.1933333+00:00 Hello,
Welcome to Microsoft Q&A!
i added the lib path and lib to additional dependency, and tried launching the app from file explorer after deleting the dll, but it gave dll not found error
Not all .lib files are static libraries.
If you want to link a static library, first of all, you have to make sure that the *.lib you have is a real static library, not an import library of a dynamic library. According to your description, What you added is an import library not a static library
Thank you.
Jeanine
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.