[SOLVED]error MSB3774: Could not find SDK

Hi,

I have 1 error “error MSB3774: Could not find SDK” same as this thread

Since I cannot reply to that thread, I want to ask is there anyone here fix that before? Is there an issue between Unity (5.3.5f1) and VS 2015? Where can I get VS 2015 RC?

Thanks

Any Visual Studio 2015 should work. That issue got resolved a long time ago.

Could you paste exactly the error you’re getting?

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

Could you try installing Windows 10 SDK from here?

I updated an attachment what did I installed on my computer on prev post. Can you please check is it correct?
If I don’t install SDK, Unity won’t allow to publish a Universal 10 project

Well, something is definitely missing. The first step to troubleshoot is to reinstall the SDK from the page I linked.

Yes I tried to remove SDK, download and reinstall it, then repair Visual Studio 2015 Update 2 but still got same error :frowning:

Are you able to create Universal application from Visual Studio 2015 menu ?

Yes I have just create a blank Universal app from VS 2015 and run it normally

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.

Do you mean this .csproj file? I also attach Include folder’s image. It’s in D:\ here

2670779–188497–MSB3774.zip (33.5 KB)

Could you also attach generated project from Visual Studio, the one which works.

At least this generated project from Unity looks correct.

Here it is
It’s not contain this SDKReference tag which I think cause this error

Windows Mobile Extensions for the UWP

2671045–188522–App1.zip (1.65 KB)

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.

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 :slight_smile:

That hides status bar on Windows Phone, so yes, it’s safe to remove.

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.