Could not find a suitable SDK to target

匿名 (未验证) 提交于 2019-12-03 08:35:02

问题:

I try to create a project for UWP but I get this error:

回答1:

I install windows development kit and it worked. Thanks



回答2:

Part of the problem can be solved by choosing an older sdk. Choose the second newest from here: https://developer.microsoft.com/en-us/windows/downloads/sdk-archive



回答3:

Installing the latest SDK didn't help me either. The installer wouldn't complete, kept getting to 97% and then rolling back.

I had a whole load of MDMERGE errors like:

MDMERGE : error MDM2009: Duplicate type Windows.Networking.NetworkOperators.TetheringOperationalState found processing metadata file C:\Users\blah\AppData\Local\Temp\UnionWinmdWorkingFolder\26178\WinMDs\Windows.Networking.NetworkOperators.NetworkOperatorsTetheringContract.winmd, type already exists in file C:\Users\blah\AppData\Local\Temp\UnionWinmdWorkingFolder\26178\WinMDs\Windows.Foundation.UniversalApiContract.winmd.

To resolve this I deleted References in

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

..and reinstalled. Seems like older kit installs are interfering with new kit installs.



回答4:

I had to install Windows SDK 10.0.10586. (control panel -> visual studio -> modify -> sdk)

Installing newer versions of the SDK would just give the same error.



回答5:

Weirdly this error occurred for me when trying to create a new solution using a class library for the initial project. The library had the same name as the project. After deleting the two empty directories it managed to leave behind I changed the project type to a console app and it created the solution and console project just fine. I was then able to add the class library project with no issues.

It's always something!



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!