Cannot build and run Windows Store 8.1

When I try to build and run my project as Windows Store 8.1, I receive the following error:

Exception: Failed to build Visual Studio project. Output:
UnityInstallationDir “C:\Program Files\Unity\Editor”.
UnityWSAPlayerDir “C:\Program Files\Unity\Editor\Data\PlaybackEngines\metrosupport”.
UnityProjectDir “C:\Users\parse_000\Documents\Chromaestro”.
Copying unprocessed assemblies…
Running AssemblyConverter…
The system cannot find the path specified.
C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\Chromaestro.csproj(190,5): error MSB3073: The command ““Unity\Tools\AssemblyConverter.exe” -platform=wsa81 “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\Assembly-CSharp.dll” “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\UnityEngine.Analytics.dll” “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\UnityEngine.dll” “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\UnityEngine.Networking.dll” “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\UnityEngine.UI.dll” “C:\Users\parse_000\Documents\Chromaestro\Chromaestro_winstore\Chromaestro\WinRTLegacy.dll”” exited with code 3.

ApplicationLauncherImpl.RunMSBuild (System.String args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:267)
ApplicationLauncherImpl.RegisterLayoutOnLocalMachine () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:213)
ApplicationLauncherImpl.Run () (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:178)
ApplicationLauncher.BuildAndRun (BuildLaunchPlayerArgs args, WSASDK wsaSDK) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:59)
ApplicationLauncher.BuildAndRun (BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ApplicationLauncher.cs:46)
UnityEditor.Metro.BuildPostprocessor.LaunchPlayer (BuildLaunchPlayerArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:76)
UnityEditor.PostprocessBuildPlayer.Launch (BuildTarget target, System.String path, System.String productName, BuildOptions options) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:282)
UnityEditor.HostView:OnGUI()

Granted, this is the first time I’ve tried to export in this format, so I might be missing something crucial. Any suggestions on where I need to start to fix this?

It seems it cannot locate Unity installation, is it located in C:\Program Files\Unity\Editor ?

Additionally, you can try simply Build, and then manually open Visual Studio solution, and build from there.

Yeah, it builds everything else right; it even builds Windows Phone 8 right. It just doesn’t want to build Windows Store at all. Also, I don’t know anything about Visual Studio, to be honest.

Could you clarify which Unity version is this?

This is Unity 5.1.1f1, running on Windows 10, with Visual Studio Community 2015 version 14.0.23107.0 D14REL

I don’t know how to use Visual Studio, but I tried to ‘deploy’ it and got an error saying it couldn’t because “the package requires architecture ARM, but this computer has architecture x64”.

You have to choose X86 or X64 configuration, you can achieve this via Build->Configuration Manager, and choose Active Solution Platform.

Okay, I was able to get it to run in Visual Studio by switching it to x86. It now appears to run all right, except that my options for changing the resolution in-game don’t work (it only allows it to go at whatever resolution the window was when it started, and doesn’t have any other available options), and it won’t let me click outside the window to manually resize it at all, or to change apps without alt-tab.

You should be able to switch resolutions in-game. How are you doing it?

But seems you’re expecting Standalone application behavior from Windows Store Apps, if that so, then you should know Windows Store Apps are different from Windows Standalone applications.

Yeah, I’m slowly starting to realize that.

So the way I’m doing it is, I’m making a Resolution array called ‘allres’, in which I’m storing Screen.resolutions, and then determining which of the resolutions is the current one. Then I have some controls set up to just increase or decrease an integer to reference the index of the array, and apply the changes when you’ve chosen the one you want.

What it appears to be doing (I’m assuming) is not actually pulling anything from Screen.resolutions, otherwise it would be putting something into the allres array.

I’m sure there’s probably a different way I should be doing it for Windows Store apps…

I think it’s expected, that Screen.resolutions doesn’t return anything on Windows Store Apps, because the D3D window in Windows Store Apps is stretchable, so basically so you can set any resolution you want.

Sorry for the late reply. The problem is that the game won’t look right at all resolutions. Is there any way to prevent resizing, or force an app to run fullscreen? Or at least force an aspect ratio?

I don’t think you can prevent resize, there is API to run application in fullscreen, but it’s a Windows 10 API, and because your application targets Windows 8.1, it will be inaccessible for you. ApplicationView Class (Windows.UI.ViewManagement) - Windows UWP applications | Microsoft Learn

You might want to consider changing camera rect or aspect depending on the windows size, for ex., Controlling Aspect Ratio in Unity