Hello juwens ,
it's possible to achieve your goal but, unfortunately, this feature isn't well documented. These are the steps you have to follow:
- You have to create a publish profile for your .NET app first. Right click on the .NET project (not the WAP one) and choose Publish. Follow the wizard by choosing:
- Folder as target
- Folder as specific target
- Leave the default publish location
- Once you have finished, click on Edit under "FolderProfile" to edit the profile and choose:
- Deployment ode: Framework-dependent
- Target runtime: win-x86 or winx-64, based on your requirements
- Once you have created it, go to the WAP project and click on the .NET project name you have referenced undered Applications. Choose Properties and you will see a property called Publishing Profile. Open the dropdown and you will she .pubxml you have just created by setting up a publish profile. Be aware that this property is set on a configuration basis, e.g. if you have Debug/X86 selected in your solution it will be set only for that configuration, you can edit your project file manually or change your configuration in VS to set the other values as needed.
Now generate the MSIX package with the WAP project, just make sure to select the same CPU architecture and configuration you have configured the publishing profile for. At the end of the process, you should get a considerably smaller MSIX package, which will contain only your executable and DLLs and not the full runtime.
I hope it helps!