Suddenly unable to build solutions anymore

Hey all,

I’m attempting to build a UWP game solution, but the errors I’m getting is stopping me dead in my tracks.

I believe these two are the culprit, as the error logs start with

followed by multiple errors of the same sort.

These errors occur with Windows Universal SDK 10.0.15063 (Latest) installed and I don’t have an idea what it means.

I’ve tried to uninstall the SDK but that just leaves me with:

I am truly confused and online sources have not helped much.
Any clues on how to approach this?

At what point did it stop working? Did you install anything?

This error suggests that there’s something wrong with your windows 10 SDK installation.

If I remember correctly, it stopped working last week Thursday, as I was able to successfully build at the end of the day Tuesday. I do recall installing some additional packages that Visual Studio 2017 installation provides. However, I’ve tried uninstalling VS2017 (which took the latest Windows 10 SDK with it), so I had to reinstall the SDK standalone.

Would it somehow be possible to point Unity towards an older SDK? Is that even a thing?

Yes. Which Unity version are you on? We added an option to select which Windows SDK you want to use in the build window a few months ago. It’s called “UWP SDK” drop down menu and defaults to “Latest installed”.

The game I am currently building runs on Unity 3.5.3p8. Updating, unfortunately is not my decision. From what version is this option available?

Could you double check the version for me? The version you wrote does not exist.

SDK selection was introduced in 5.5.1p4.

If you can’t update, let’s explore other options - but can you at least confirm the version you’re on right now?

Oh my apologies, I meant 5.3.5p8.

Can you tell me the contents of this folder on your machine?

C:\Program Files (x86)\Windows Kits\10\Platforms\UAP

And what does this registry value point to?

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0\ProductVersion

These are the contents of the requested directory.

And the registry key points to 10.0.15063.

Change the registry key to point to “10.0.14393”. That should make it work with that old Unity version.

This has indeed seemed to fix the building errors. What exactly is it that I changed? Would reinstalling the latest SDK reset the key value?

Yes, installing the latest SDK would put it back to 10.0.15063. The problem is that Unity 5.3 does not work with the newest windows SDK out of the box, since they changed the SDK layout. Unity 5.3 (actually 5.4 and earlier versions) would look at that registry key to determine which SDK version to use. In Unity 5.5 we noticed that our code stopped working with the newest windows SDK, so we made 2 things:

  1. Fixed it so Unity can work with the latest SDK now;
  2. Made an SDK selection menu instead of always relying on that registry key, so if future SDKs break us again, you wouldn’t have to go touch your registry to be able to target older SDK that we support just by selecting it in the build window.

These fixes were released in 5.5.1p4.