Search Unity

Question can we publish to the Microsoft Store without using UWP?

Discussion in 'Windows' started by creat327, Jan 4, 2023.

  1. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    I find it hard to find lot of libraries for UWP and I was told (and confirmed by a google search) that UWP is now deprecated and only getting fixes and updates.

    So the question is, how do we publish our windows games from Unity into the Microsoft Store WITHOUT compiling for UWP?

    Any ideas?
     
    Last edited: Jun 8, 2023
  2. Ubrano

    Ubrano

    Joined:
    Jul 23, 2017
    Posts:
    16
    @creat327 did you manage to publish your Windows desktop game to the MS App Store?

    Trying to port a game to Windows and the MS App Store I found this page https://learn.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-packaging-dot-net explaining that once you've built your game (which would be a windows desktop and not UWP), i.e. created a visual studio solution, what you need do in VS is add to your project a Windows Application Packaging Project. The latter acts as a wrapper, so you need reference the original project, link to the store application record, create a certificate for local testing and whatnot. For the time being I can't add more, as I am stuck with the local test build.

    BTW, two things developers taking this path are likely to encounter are: (1) auto-generated icons from the MS suggested 400x400px prototype are ok in general, but some may fail the build due to their size in Bytes, which can be solved by "manually" managing .png quality and (2) for testing purposes the "self-signed" certificate needs be installed in some "Trusted People" folder, at least that's where I finally got it going.

    So, I have this VS Solution created from Unity for a Windows desktop application. When I build that thing in VS as an exe file, it builds just fine and everything works. Noticeably dll files are copied to some "data" folder that sits in parallel to the "bin" folder, including UnityPlayer.dll and also all the plugins are there somewhere.

    Strangely enough, whereas I have referenced the "original project" in the Windows Application Packaging Project, when I build and install it, it would not even start to run saying UnityPlayer.dll is missing. After struggling to gain access to some obscure folder of applications installed from the store hosting my game, I realised no dll files were there.

    Cleary the build settings for this package are not complete, e.g. references missing and whatnot.

    Any ideas?
     
    creat327 likes this.
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    You might have to heavily modify the project Unity generates. While all those files (like UnityPlayer.dll and the Data folder) appear in the build folder, they aren't actually built/copied by the VS project - rather, they're copied by Unity prior to generating the project. The project itself knows nothing about it, and I assume that's why the packaging project is not picking them up.
     
    Ubrano likes this.
  4. Ubrano

    Ubrano

    Joined:
    Jul 23, 2017
    Posts:
    16
    Thanks for pointing that out. I built/created another VS solution from Unity just to see what's later on touched by VS when building an exe and effectively, as you said,

    bin>x64>Master has baselib.dll, baselib.dll.lib, UnityCrashHandler64.exe and UnityPlayer.dll put there by Unity and

    when VS builds an exe files GameAssembly.dll, GameAssembly.pdb, MyGameTitle.exe, MyGameTitle.exp, MyGameTitle.lib and MyGameTitle_x64_Master_il2cpp.pdb are added. MyGameTitle_Data folder remains as composed by Unity, i.e. unchanged.

    Do you know of an available example on what needs be done / linked / referenced / etc. to successfully build a Windows Application Packaging Project from a Unity premade VS Solution for a Windows desktop application?
     
  5. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    yes, i'm finding it super difficult to build and publish to the Windows Store without using UWP. No tutorials or anything from Unity side?
     
    StrangeWays777 likes this.
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Take a look at Unity Data.vcxproj that gets generated for UWP projects. That will show you how to include those files for deployment - you will need to make the Windows project look similar.
     
    Ubrano likes this.
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    any way this can be made easier by Unity? UWP is becoming deprecated by microsoft, so it will be an important issue real soon.
     
  8. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    I don't think we have any planned improvements in this area, unfortunately.