Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. We've updated our Terms of Service. Please read our blog post from Unity CTO and Co-Founder Joachim Ante here
    Dismiss Notice
  4. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  5. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

Warning: Do not update to Windows SDK 10.0.10586.0 just yet

Discussion in 'Windows' started by Tautvydas-Zilys, Dec 1, 2015.

  1. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    Hello,

    Microsoft has released a new Windows 10 SDK yesterday (version 10.0.10586.0):

    http://blogs.msdn.com/b/chuckw/archive/2015/11/30/windows-10-sdk-november-2015.aspx

    There was a bug uncovered in Unity recently where it fails to read Windows 10 SDK version correctly if this new SDK is installed. Due to this bug, Unity will generate incorrect project files when targeting Windows Store with Windows 10 SDK, which Visual Studio will not be able to open.

    We're going to release a patch to fix this bug, but until we do, please do not download and install this SDK if you wish to build for Windows 10. I'll notify in this thread when the fix is released.

    The older Windows 10 SDK which works with Unity (version 10.0.10240.0) can be downloaded here:

    https://dev.windows.com/en-us/downloads/sdk-archive

    UPDATE: Fix is now available in 5.2.3p3 and 5.3.1f1 releases.
     
    Last edited: Dec 18, 2015
  2. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,106
    >.< bummer... I updated yesterday and yep, I'm not able to open new builds... missing object reference from the csproj file.


    is there a workaround(s) that I can edit into the project .csproj file? Seems like a lot of namespace errors happening causing it...


    [edit]

    nvm... looks like via VS installer I can revert to 10.0.10240.0 (i'll give that a try)
     
    Last edited: Dec 1, 2015
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    Yes. You can manually fix "TargetPlatformVersion" XML field of .csproj file to be "10.0.10586.0" rather than "10.0.10586.0.0".
     
    Garth-Smith likes this.
  4. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,609
    @Tautvydas Zilys Do you mean ""10.0.10586.0" rather than "10.0.10240.0.0"" :D in your previous statement?

    So to confirm, it's possible to simply fix manually then?
     
  5. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,106
    via Visual Studio 2015 Installer, I was able to remove 10.0.10586.0 (10.0.10240.0 was still available), and unfortunately now Unity is unable to compile as it continues to look for 10.0.10586.0 :

    - Finished compile Library/ScriptAssemblies/Assembly-CSharp-firstpass.dll
    Compilation failed because the compiler couldn't be executed!

    (Filename: Line: 57396624)

    DisplayProgressNotification: Build Failed
    Error building Player because scripts had compiler errors

    ... I'll re-apply 10.0.10586.0 and do the .csproj edit to see if that allows me to atleast do the exports from Unity and builds in Visual Studio.
     
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    No, my post is correct. Unity adds an extra ".0" to the version number. Visual studio gets confused, chaos ensues.

    The workaround is possible, but it's ugly. You'll have to do it each time you build from Unity if you use C# projects and you'll also have to do it each time you build to a new location.
     
  7. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,609
    Thanks for the clarification @Tautvydas Zilys Easy to miss that distinction.
     
  8. tswalk

    tswalk

    Joined:
    Jul 27, 2013
    Posts:
    1,106
    ok, after much 'to-do' ... replacing 10586 with 10240 'and' updating the references in the project for "Windows Mobile Extensions for UWP..." allows the project to open and build in Visual Studio (of course using older SDK)

    otherwise, updating to 10.0.10586.0 and removing just the extra .0 I get the following:


    The project requires a platform SDK (UAP, Version=10.0.10586.0) that is not installed.


    which of course it is installed :D
     
    Last edited: Dec 1, 2015
  9. Garth-Smith

    Garth-Smith

    Joined:
    Apr 26, 2012
    Posts:
    1,237
    This fixed most of my project for me. Combined with this line which also had an extra zero I was able to build.
    Code (csharp):
    1. <SDKReference Include="WindowsMobile, Version=10.0.10586.0.0">
    Changed to
    Code (csharp):
    1. <SDKReference Include="WindowsMobile, Version=10.0.10586.0">
     
  10. Garth-Smith

    Garth-Smith

    Joined:
    Apr 26, 2012
    Posts:
    1,237
    I experience the same thing. Uninstalling Win 10 SDK 10.0.10586.0 does not allow me to build. Unity still looks for that version number.

    Reinstalling latest Win 10 SDK and making some edits to the .csproj file allowed me to build.
     
  11. nhkduy90

    nhkduy90

    Joined:
    Jul 25, 2014
    Posts:
    6
    I see patch #2 just release, is this problem fixed or we need wait new patch?
     
  12. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    The fix is not in today's patch.
     
  13. Garth-Smith

    Garth-Smith

    Joined:
    Apr 26, 2012
    Posts:
    1,237
    Hey guys, I wrote a quick fix. This script should be put in an Editor folder to prevent build errors. I put mine in Assets/Editor/Win10SdkFix.cs

    Code is here:
    Code (csharp):
    1. /* Garth: The Windows 10 SDK was updated recently, which broke Unity builds.
    2. * It came down to a few extra ".0" in an XML file someplace.
    3. * Instead of manually changing it, let's just code Unity to do it for us.
    4. */
    5.  
    6. #if UNITY_WSA
    7. using UnityEngine;
    8. using UnityEditor;
    9. using UnityEditor.Callbacks;
    10. using System.IO;
    11.  
    12. public class Win10SdkFix
    13. {
    14.     [PostProcessBuild(1)]
    15.     public static void OnPostprocessBuild(BuildTarget target, string pathToBuiltProject)
    16.     {
    17.         string name = PlayerSettings.productName;
    18.         string pathToXml = pathToBuiltProject + "/" + name + "/" + name + ".csproj";
    19.         Debug.Log("Attempting to fix bad SDK version at " + pathToXml);
    20.         if (!File.Exists(pathToXml))
    21.         {
    22.             Debug.Log("Could not find " + name + ".csproj file to fix.");
    23.             return;
    24.         }
    25.         string xml = File.ReadAllText(pathToXml);
    26.         if (!xml.Contains(BadString))
    27.         {
    28.             Debug.LogWarning("Could not find bad string in " + name + ".csproj file. Have you updated Unity? You can remove this script.");
    29.         }
    30.         else
    31.         {
    32.             xml = xml.Replace(BadString, GoodString);
    33.             File.WriteAllText(pathToXml, xml);
    34.             Debug.Log("Fixed sdk version string in " + name + ".csproj file.");
    35.         }
    36.     }
    37.  
    38.     const string BadString = "10.0.10586.0.0";
    39.     const string GoodString = "10.0.10586.0";
    40. }
    41. #endif
     
    Last edited: Dec 3, 2015
    -chris, z00n, ArthurT and 5 others like this.
  14. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,609
    Great work @Garth Smith Could probably enhance that by also testing the buildtarget, so it's only evaluated for the Win10 builds. Presently it will fire for all platforms.
     
  15. Garth-Smith

    Garth-Smith

    Joined:
    Apr 26, 2012
    Posts:
    1,237
    It's wrapped in #if UNITY_WSA so that class doesn't even exist for other platforms. =p
     
  16. SimonDarksideJ

    SimonDarksideJ

    Joined:
    Jul 3, 2012
    Posts:
    1,609
    Ahh, didn't spot that. Thanks for the clarification :D
     
  17. ScottFromDerby

    ScottFromDerby

    Joined:
    Nov 20, 2012
    Posts:
    14
    What bad luck. Just lost 3 hours due to this :'( glad to know there is a potential fix on its way. Thanks for the script Garth, seems to have made a difference :)
     
    Garth-Smith likes this.
  18. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    Do I need to be on the latest major upgraded version Windows 10 for this SDK?

    My attempts to upgrade to that major upgrade version failed due to a driver installation problem during the upgrade process at 23%
     
  19. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    I don't think so - I actually installed it on build 10240 (Windows 10 v1).
     
    goat likes this.
  20. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    Update:

    Fix is now available in 5.2.3p3 release. The fix is not in 5.3.0f4 - it will be included in 5.3.0p1 next week.
     
    Garth-Smith likes this.
  21. mechangel

    mechangel

    Joined:
    Nov 6, 2012
    Posts:
    73
    I am on 5.2.3p3, VS 2015 14.0.24720.00 Update 1 , .Net version 4.6.01038, Windows 10 home 10586.29

    I was able to get my built solution of an empty project with a cube in a scene to to load in VS 2015 after switching from 5.3.0f4 to the latest 5.2.3p3 patch, but I am still not able to get a Build and Run from Unity to work or Deploying the solution in VS to test it, or "Create an App Package" in VS. Has anyone been able to get this working? I am a first time VS studio user, so I have been following directions on http://blogs.msdn.com/b/uk_faculty_...orting-your-unity-5-2-game-to-windows-10.aspx

    Edit: I am able to build a simple "Hello World" Win 10 project and deploy it just fine in VS, so I know the SDK is installed.
     
    Last edited: Dec 14, 2015
  22. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    I replied to your other thread. The issue seems unrelated to the SDK.
     
  23. jotapeh_

    jotapeh_

    Joined:
    Nov 16, 2012
    Posts:
    32
    If I install 10.0.10586.15 (not the version terminating with a 0 but a newer one), will I run into this issue? Does 5.2.3p3 solve it?
     
  24. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    You will. And 5.2.3p3 fixes it.
     
    jotapeh_ likes this.
  25. mechangel

    mechangel

    Joined:
    Nov 6, 2012
    Posts:
    73
    I was able to deploy using Unity 5.2.3p3, VS 2015 14.0.24720.00 Update 1 with the latest version of Win 10 SDK as of Dec, 12, 2015, .Net version 4.6.01038, Windows 10 home 10586.29
    Edit: It looks like I actually was wrong about using 5.3, my install was overwrote with 5.2.3p3, I didn't want my false claims of 5.3.04f working with that SDK hanging around. Maybe I just had my Unity versions backwards all along since updating.
     
    Last edited: Dec 17, 2015
  26. PushoN

    PushoN

    Joined:
    Jul 5, 2012
    Posts:
    4
    i got error on build, Unity 5.3.0.4f VS 2015 Update 1,

     
    Last edited: Dec 16, 2015
  27. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    Update:

    The fix is now available in 5.3.1f1 release too.
     
    Garth-Smith likes this.
  28. MMTim

    MMTim

    Joined:
    Aug 24, 2014
    Posts:
    5
    Hi,

    I updated to 5.3.1f1 so I can build for Windows 10 UWP. When I load my project I see 999+ of the following errors in the console:

    IsFinite(outDistanceForSort)
    UnityEditor.DockArea:OnGUI()

    and in the game UI view some of the items i.e. button labels do not render. Sometimes after a few minutes the errors stop and the Game renders correctly, sometimes it continues until I exit unity. If it stops and I run the game and then stop again the problem restarts.

    Is there a fix for this issue?

    Thanks,
    Tim
     
  29. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,767
    I think this is discussed here - http://forum.unity3d.com/threads/5-3-released.372567/page-6
     
  30. MMTim

    MMTim

    Joined:
    Aug 24, 2014
    Posts:
    5
    Thanks Tomas, I see its mentioned along with many other issues, Any way for me to get this specific issue addressed? Is a patch going to be released today for this and all of the other issues?
     
  31. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    1,767
    Try checking this - http://unity3d.com/unity/qa/patch-releases 5.3.1p1
     
  32. MMTim

    MMTim

    Joined:
    Aug 24, 2014
    Posts:
    5
    Thanks again Tomas, I'll give this a try. Happy Holidays!
     
  33. MMTim

    MMTim

    Joined:
    Aug 24, 2014
    Posts:
    5
    Good news! 5.3.1p1 has solved all of the issues I was seeing, thanks! Happy Holidays!
     
  34. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    OK, I am getting this error but I will try 5.3.1p1 too. I have 5.3.1f1 now.

    Code (csharp):
    1.  
    2. UnityException: Failed to run assembly converter with command -metadata=0 -platform=uap -lock="UWP\project.lock.json" Temp\StagingArea\Assembly-CSharp.dll -path="Temp\StagingArea".
    3. System.InvalidOperationException: Sequence contains no matching element
    4.   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
    5.   at Unity.GenericContext.Retarget(GenericParameter value)
    6.   at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
    7.   at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
    8.   at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
    9.   at Unity.FixReferencesStep.Visit(TypeDefinition type)
    10.   at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
    11.   at Unity.TypeDefinitionDispatcher..ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
    12.   at Unity.FixReferencesStep.ProcessModule()
    13.   at Unity.ModuleStep.Execute()
    14.   at Unity.FixReferencesStep.Execute()
    15.   at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
    16.   at Unity.Operation.Execute()
    17.   at Unity.Program.Main(String[] args)
    18.  
    19. PostProcessUAPDotNet.RunAssemblyConverterNoMetadata (System.String assembly, System.String projectLockFile) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessUAPDotNet.cs:106)
    20. PostProcessWinRT.RunReferenceRewriter () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:570)
    21. PostProcessWinRT.Process () (at C:/buildslave/unity/build/PlatformDependent/WinRT/SharedSources/CSharp/PostProcessWinRT.cs:123)
    22. UnityEditor.Metro.BuildPostprocessor.PostProcess (BuildPostProcessArgs args) (at C:/buildslave/unity/build/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:133)
    23. 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)
    24. UnityEditor.HostView:OnGUI()
    25.  
    26.  
    27. Error building Player: UnityException: Failed to run assembly converter with command -metadata=0 -platform=uap -lock="UWP\project.lock.json" Temp\StagingArea\Assembly-CSharp.dll -path="Temp\StagingArea".
    28. System.InvalidOperationException: Sequence contains no matching element
    29.   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
    30.   at Unity.GenericContext.Retarget(GenericParameter value)
    31.   at Unity.ModuleContext.Retarget(TypeReference type, GenericContext context)
    32.   at Unity.ModuleContext.Retarget(MethodReference method, GenericContext context)
    33.   at Unity.FixReferencesStep.Visit(MethodDefinition method, GenericContext context)
    34.   at Unity.FixReferencesStep.Visit(TypeDefinition type)
    35.   at Unity.TypeDefinitionDispatcher.DispatchType(TypeDefinition type)
    36.   at Unity.TypeDefinitionDispatcher..ctor(ModuleDefinition module, ITypeDefinitionVisitor visitor)
    37.   at Unity.FixReferencesStep.ProcessModule()
    38.   at Unity.ModuleStep.Execute()
    39.   at Unity.FixReferencesStep.Execute()
    40.   at Unity.Step.Execute(OperationContext operationContext, IStepContext previousStepContext)
    41.   at Unity.Operation.Execute()
    42.   at Unity.Program.Main(String[] args)
    43.  
     
  35. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    Hmmm, OK upgrade of Unity to 5.3.1p1 and deletion of more asset packages not in use did not solve the problem. Most of the remaining asset packages imported have portions of them in use.

    I still get the same error as the previous post.
     
  36. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    I can get an empty SDK Windows Universal 10 build to work...so I'll look in the debugger and see which of the assets imported is causing the build process to fail.
     
  37. mrm83

    mrm83

    Joined:
    Nov 29, 2014
    Posts:
    203
    i am using 5.3.1.f1 with latest windows 10 sdk (downloaded today) and i cant run my project

    whenever i try to run the project from vs, i get error on this line from the csproj file..

    <Exec Command="&quot;$(UnityWSAToolsDir)\AssemblyConverter.exe&quot; -platform=uap -lock=&quot;$(ProjectDir)project.lock.json&quot; -bits=$(UnityBits) -removeDebuggableAttribute=$(RemoveDebuggableAttribute) -path=&quot;.&quot; -path=&quot;..\Players\UAP\$(PlatformTarget)\$(Configuration)&quot; &quot;$(ProjectDir)Assembly-CSharp-firstpass.dll&quot; &quot;$(ProjectDir)Assembly-CSharp.dll&quot; &quot;$(ProjectDir)Assembly-UnityScript.dll&quot; &quot;$(ProjectDir)UnityEngine.dll&quot; &quot;$(ProjectDir)Stores.dll&quot; &quot;$(ProjectDir)UnityEngine.Analytics.dll&quot; &quot;$(ProjectDir)winrt.dll&quot; &quot;$(ProjectDir)XMLEncrypto.dll&quot; &quot;$(ProjectDir)UnityEngine.UI.dll&quot; &quot;$(ProjectDir)SmartLocalization_Runtime.dll&quot; &quot;$(ProjectDir)Apple.dll&quot; &quot;$(ProjectDir)GETween.dll&quot; &quot;$(ProjectDir)UnityEngine.Networking.dll&quot; &quot;$(ProjectDir)GUIAnimator.dll&quot; &quot;$(ProjectDir)UnityEngine.Purchasing.dll&quot;" />
    <Message Importance="high" Text="AssemblyConverter done." />

    anyone know why? My other project with 5.2 and the same win10 sdk works..
     
  38. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    5,849
    This is not related to the issue that this thread described. Make a new thread if you want to ask for help regarding your issue.
     
  39. goat

    goat

    Joined:
    Aug 24, 2009
    Posts:
    5,177
    My bug was fixed in Unity 5.3.1p4. Thanks.