Forum Discussion
How to package a Windows Desktop C++ application together with its DLL dependency using MSIX
I'm not sure about your .txt files, but probably using the desktop7 extension to set the working directory would help.
- alcroitoDec 06, 2023Copper Contributor
Hello, thank you for your reply.
Could you maybe clarify your answer a bit more? Because I am not very familiar with these projects.
How and at what stage should I place the dll into the root folder of the project, if its built as part of the visual studio solution? I expected that adding a reference to the dll project would suffice, but it doesn't appear to be the case. Do I need to write some shell script? Is there some UI button in VS that i can press? Some specific package or manifest xml command?
I am not familiar with PSF. How is it relevant for this situation?
Regarding .txt files, i am not even at a stage where i want to be able to find them within the package.
My problem is making sure they are added to the package in the first place. Is there a common way to do that?
Thank you.
- ManasJan 13, 2025Copper Contributor
The way I got files into the package was to Add a New Folder to the project, rename the new folder the name of the project (i.e., myapp), then use File Explorer to copy the files into the new folder add them as Existing Items. Set the property of the added files to Content. Confirm success by opening the project's .wapproj file and searching for <Content Include="myapp\myfile">.
After publishing the app, locate it in C:\Program Files\WindowsApps\[package name]...\myapp\... You should see the files in there.
- Feb 09, 2025
Re-reading the original post...
Manas solution should work. But you might consider adding the free VS Extension from Advanced Installer and creating the MSIX build project with that instead of the WAP. It sounds like your package should be simple enough to do (when you reference both the exe and dll projects you'll end up with both components in the package without manually adding it). More complex packages require purchasing the full product from them, but you shouldn't need that.