Search Unity

[SOLVED]error MSB3774: Could not find SDK

Discussion in 'Windows' started by huuhau, Jun 8, 2016.

  1. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
  2. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Any Visual Studio 2015 should work. That issue got resolved a long time ago.

    Could you paste exactly the error you're getting?
     
  3. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Hi Tautvydas Zilys,

    Here is my log:

    1>------ Build started: Project: Circles Dodge, Configuration: Debug x64 ------
    1> UnityInstallationDir "D:\Program Files\Unity\Editor".
    1> UnityWSAPlayerDir "D:\Program Files\Unity\Editor\Data\PlaybackEngines\MetroSupport".
    1> UnityProjectDir "C:\Users\Hau\Documents\Triangle_Winphone".
    1> Copying unprocessed assemblies...
    1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2049,5): error MSB3774: Could not find SDK "WindowsMobile, Version=10.0.10586.0".
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========

    I already installed that SDK(attachment)
    Thanks
     

    Attached Files:

    Last edited: Jun 8, 2016
  4. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
  5. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
  6. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,674
    Well, something is definitely missing. The first step to troubleshoot is to reinstall the SDK from the page I linked.
     
  7. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Yes I tried to remove SDK, download and reinstall it, then repair Visual Studio 2015 Update 2 but still got same error :(
     
  8. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    Are you able to create Universal application from Visual Studio 2015 menu ?
     
  9. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Yes I have just create a blank Universal app from VS 2015 and run it normally
     
  10. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    Could you attach the generated project here. Maybe your generated project targets 10240 SDK, which is available on your machine, but you may be missing 10586 SDK.

    Go to C:\Program Files (x86)\Windows Kits\10\Include, and see if you have 10.0.10586.0 directory there.
     
  11. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Do you mean this .csproj file? I also attach Include folder's image. It's in D:\ here
     

    Attached Files:

  12. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    Could you also attach generated project from Visual Studio, the one which works.

    At least this generated project from Unity looks correct.
     
  13. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Here it is
    It's not contain this SDKReference tag which I think cause this error
    <SDKReference Include="WindowsMobile, Version=10.0.10586.0">
    <Name>Windows Mobile Extensions for the UWP</Name>
    </SDKReference>
     

    Attached Files:

    Last edited: Jun 9, 2016
  14. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    I am not exactly sure, why it wouldn't be installed for you. Are you able to run the application on Windows Phone?

    You could remove that reference and see if that helps.
     
  15. huuhau

    huuhau

    Joined:
    Mar 28, 2014
    Posts:
    17
    Yeah you are right. When that reference is removed, project can be built it now.
    Just another question, I got another error which if I remove it, game run normally, so is it safe to do that?

    error CS0103: The name 'StatusBar' does not exist in the current context
    private void InitializeUnity(string args)
    {
    ...
    if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
    {
    StatusBar.GetForCurrentView().HideAsync();
    }
    ...
    }

    Thanks for your quick reply, Tauvidas and Thomas :)
     
  16. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,902
    That hides status bar on Windows Phone, so yes, it's safe to remove.
     
  17. GearKlik

    GearKlik

    Joined:
    Sep 21, 2015
    Posts:
    58
    For future travelers I might have a repro. It looks as though if you try and build your Win Store project (maybe by mistake) with "Target Device" set to "Any device" then set it back to "PC" Unity won't clear the mobile dependencies out of the VS files. A fix for me was nuke everything out of Unity except for Assets and ProjectSettings, then set "Target Device" to "PC" BEFORE you try and build a Win Store app.