Search Issue Tracker
Fixed in 2020.2.X
Fixed in 2019.4.X, 2020.1.X
[UWP] Building multi-platform .appxbundle via MSBuild fails with IL2CPP scripting backend
How to reproduce:
1. Create a new empty project
2. Switch Target platform to UWP
3. Set 'Scripting Backend' to IL2CPP
4. Build the project
5. Open the PowerShell in the Build directory
6. Execute the following commands:
1. $msbuild='C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe'
2. & $msbuild .\<PROJECT-NAME>.sln /t:"restore,build" /p:"AppxBundle=Always;AppxBundlePlatforms=x86|ARM" /p:Configuration=Master > build.txt 2>&1
Expected result: "0" is printed out (meaning that the building was successful)
Actual result: "1" is printed out (meaning that the building failed)
Reproducible with - 2017.4.0f1, 2017.4.29f1, 2018.4.3f1, 2019.1.8f1, 2019.2.0b8, 2019.3.0a8
This is caused by a "feature" in MSBuild were the output directory is nested when performing a multi-platform build. This functionality must be explicitly disabled to build the Unity generated project. The issue is discussed on these MS developer sites:
To work around this issue pass: "/p:UseSubFolderForOutputDirDuringMultiPlatformBuild=false" on the MSBuild command line.
& $msbuild .\<PROJECT-NAME>.sln /t:"restore,build" /p:"AppxBundle=Always;AppxBundlePlatforms=x86|ARM" /p:Configuration=Master /p:UseSubFolderForOutputDirDuringMultiPlatformBuild=false > build.txt 2>&1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.