问题
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.
回答1:
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
回答2:
please take a look at this tool by which you may create a package manually and it also offers lots of advanced options.. https://docs.microsoft.com/en-us/windows/msix/package/create-app-package-with-makeappx-tool
来源:https://stackoverflow.com/questions/57574039/upload-uwp-app-to-microsoft-store-in-all-3-platforms-x86-x64-arm