uwpwindows-10windows-store-appswin-universal-appwindows-10-universal

Upload UWP app to Microsoft Store in all 3 platforms (x86, x64, ARM)


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


Solution

  • 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