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!
