5.2b6 Store Universal 10 output cannot be built using VS2015

Hello, anyone successfully using store universal 10 build feature?

Environment:

  • Windows 8.1 (64)
  • Unity 5.2 b6 (64)
  • VisualStudio 2015 community

Steps to reproduce:

  1. Create 2D project.
  2. Add a sprite to scene.
  3. File > Build Settings > Windows Store, select following options
    SDK : Universal 10
    UAP Build Type : XAML
  4. Open generated VS solution using VS 2015 Community. I get following error.
    Am I doing something wrong? or some manual fix in generated solutions is necessary.

Thanks in advance for any advice or comments.

Severity     Code     Description     Project     File     Line
Error     CS1022     Type or namespace definition, or end-of-file expected 52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     23
Error     CS1001     Identifier expected     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     22
Error     CS1514     { expected     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     22
Error     CS0116     A namespace cannot directly contain members such as fields or methods     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     22
Error     CS1001     Identifier expected     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     23
Error     CS1514     { expected     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     23
Error     CS0116     A namespace cannot directly contain members such as fields or methods     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     23
Error     CS1022     Type or namespace definition, or end-of-file expected     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     24
Error     CS0234     The type or namespace name 'Runtime' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\AppData\Local\Temp\.NETCore,Version=v5.0.AssemblyAttributes.cs     4
Error     CS0518     Predefined type 'System.String' is not defined or imported     52b6test     C:\Users\e11655\AppData\Local\Temp\.NETCore,Version=v5.0.AssemblyAttributes.cs     4
Error     CS0246     The type or namespace name 'FrameworkDisplayName' could not be found (are you missing a using directive or an assembly reference?)     52b6test     C:\Users\e11655\AppData\Local\Temp\.NETCore,Version=v5.0.AssemblyAttributes.cs     4
Error     CS0518     Predefined type 'System.String' is not defined or imported     52b6test     C:\Users\e11655\AppData\Local\Temp\.NETCore,Version=v5.0.AssemblyAttributes.cs     4
Error     CS0234     The type or namespace name 'Collections' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     2
Error     CS0234     The type or namespace name 'IO' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     3
Error     CS0234     The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     4
Error     CS0234     The type or namespace name 'Runtime' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     5
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     27
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     29
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     29
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     30
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     30
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     36
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     47
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     47
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     47
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     47
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     67
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     67
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     67
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     67
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     90
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     90
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     90
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     90
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     96
Error     CS0518     Predefined type 'System.String' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\App.xaml.cs     96
Error     CS0234     The type or namespace name 'Collections' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     2
Error     CS0234     The type or namespace name 'IO' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     3
Error     CS0234     The type or namespace name 'Linq' does not exist in the namespace 'System' (are you missing an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     4
Error     CS0246     The type or namespace name 'UnityEngine' could not be found (are you missing a using directive or an assembly reference?)     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     5
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     28
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     30
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     30
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     32
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     32
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     33
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     33
Error     CS0122     'Rect' is inaccessible due to its protection level     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     33
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     34
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     34
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     36
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     71
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     71
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     71
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     71
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     77
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     86
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     101
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     131
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     131
Error     CS0518     Predefined type 'System.Void' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     136
Error     CS0012     The type 'Object' is defined in an assembly that is not referenced. You must add a reference to assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     147
Error     CS0518     Predefined type 'System.Object' is not defined or imported     52b6test     C:\Users\e11655\dev\unity\52b6test\Build\uwp10_b\52b6test\MainPage.xaml.cs     147

:
:

I know this is an old(ish) post, but I’ve just encountered this problem when doing a Windows Store\Universal 10\XAML build in the release version of Unity 5.2 and Windows 10 RTM.

To solve this I found it was missing a reference to Microsoft.NETCore.UniversalWindowsPlatform. This, and other required references, can be found in the project.json file of the Visual Studio solution. When I added this reference through the Package Manager Console I found it reviewed the JSON file and added the package mentioned above along with all the other references specified in the “dependencies” section of the JSON file. After it had completed this process it built successfully.

I also remember that I switched off the “Allow Nuget to download missing packages” within the “Tools\NuGet Manager Console\General” options. If this was switched on, then the manual process of adding the above references would not be required as this will be done automatically during the build.