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?
@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 Package a desktop app from source code using Visual Studio - MSIX | Microsoft Learn 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.
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.
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?
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.