Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Failing to build for Windows 10 + XAML

Discussion in 'Windows' started by akromm, Mar 6, 2016.

  1. akromm

    akromm

    Joined:
    Jan 14, 2014
    Posts:
    3
    I'm trying to build my project for Windows 10 + XAML build type, but when I do I get the following error message in the unity output:


    UnityEditor.HostView:OnGUI()
    UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
    (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:316)UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args)
    (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:133)PostProcessWinRT.Process ()
    (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:106)PostProcessUAP.CheckSafeProjectOverwrite ()
    (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAP.cs:146)
    UnityException: Build path contains D3D UAP project which is incompatible with XAML project.


    It does however generate the .sln output, but when I try to build it I get the following in VS output:


    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==================== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    1>C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.Common.targets(263,5): Xaml Internal Error error WMC9999: Type universe cannot resolve assembly: System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a.
    1>C:\Users\Adam\Documents\Projects\alexginfinity\Builds\wp10xaml2\Alex G - Infinity\Alex G - Infinity.csproj : XamlCompiler error WMC1006: Cannot resolve Assembly or Windows Metadata file 'System.Runtime.dll'

    1> Copying unprocessed assemblies...
    1> UnityProjectDir "C:\Users\Adam\Documents\Projects\alexginfinity".
    1> UnityWSAPlayerDir "C:\Program Files\Unity5.3.3f1\Editor\Data\PlaybackEngines\MetroSupport".
    1> UnityInstallationDir "C:\Program Files\Unity5.3.3f1\Editor".
    1>------ Build started: Project: Alex G - Infinity, Configuration: Debug x86 ------

    I'm using Unity 5.3.3f1

    Any suggestions?
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,647
    As the error says you're building to path where previously a different project type was built, that's not allowed, delete the target path in this case.
     
  3. akromm

    akromm

    Joined:
    Jan 14, 2014
    Posts:
    3
    I was targeting a new empty folder, but the error message didn't go away until I restarted Unity.

    The second error message however persisted until I updated some NuGet packages and rebuilt the solution.
     
  4. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,624
    My guess would be that you didn't clear error log manually and Unity editor failed to do so for some reason, so you saw the errors from an old build.