1

I have a 3rd party DLL (in all 3 platforms x86, x64 and ARM) referring in my UWP app. Due to this reason I have to change my reference manually each time I need to build my UWP app to specific platforms.

Now I need to publish the app to the store but I can't select all platforms due to the manual handling of the 3rd party DLL. I tried building the app in release mode separately and tried to upload to the store but it does not allow. Only way possible is by selecting all 3 platforms in the crate app package window.

Please help me to find a way to upload the app supporting all 3 platforms. Thanks in advance.

NOTE: I can't use any-cpu option since the dll and the app both refers to SQLite libraries which do not support any-cpu.

enter image description here

SurenSaluka
  • 1,534
  • 3
  • 18
  • 36
  • 1
    Create an [app bundle](https://learn.microsoft.com/en-us/windows/msix/package/packaging-uwp-apps) that contains three separate app packages for the x86, x64, and ARM configurations? What's the issue with using the wizard? – mm8 Aug 20 '19 at 14:16
  • Store is not accepting 3 packages. If you can build all 3 at once you can see only one appxupload file generates. That’s only the store accepts. – SurenSaluka Aug 20 '19 at 15:46

2 Answers2

2

You can use a prebuild event to change which DLL to import before each build.

copy "$(ProjectDir)\Extensions\$(PlatformName)\IronOne.Converter.Windows.dll" "$(ProjectDir)"\Extensions\Active"

From there you can just change your DllImport to $(ProjectDir)"\Extensions\Active

Adam Dernis
  • 530
  • 3
  • 14
  • 1
    This is a brilliant answer. Adding this prebuild command sort my problems out. Now I can successfully submit the package supporting all platforms to the Microsoft Store. – SurenSaluka Aug 21 '19 at 05:36
1

please take a look at this tool by which you may create a package manually and it also offers lots of advanced options.. https://learn.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool

Hanzalah Adalan
  • 123
  • 1
  • 8
  • I don’t think this is what I want. This tool does not create appxupload file. Which is required for store upload. – SurenSaluka Aug 20 '19 at 17:23
  • 1
    Ah I see.. sorry I don't have time right now to take a deeper look.. sumimasen :( – Hanzalah Adalan Aug 20 '19 at 17:36
  • 1
    @SurenSaluka This is how to create the appx.upload manually: https://learn.microsoft.com/en-us/windows/msix/package/packaging-uwp-apps#create-your-app-package-upload-file-manually – Hanzalah Adalan Aug 20 '19 at 17:44