首页 > 解决方案 > 我无法将 Windows SDK 版本更改为 10.0.17763.0 ,当我单击应用时它只是重置回 8.1

问题描述

我正在尝试编译 mpc-hc。我遇到了很多诸如此类的错误cannot open include file "ctype.h",并且视觉工作室使用的标题来自 8.1 sdk。我删除了每个 sdk,但最新的一个,但现在我得到了这个:

The Windows SDK version 8.1 was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting "Retarget solution"

但我不能告诉视觉工作室使用最新的 sdk。它只是立即重置回 sdk 8.1。

我试过这个Can't change Windows SDK version in Visual Studio C++ project,现在设置了 10.0.17763.0,但在 gui 中仍然显示 8.1。

我还尝试删除 Visual Studio 中的一些设置,如此处所述https://blogs.msdn.microsoft.com/willy-peter_schaub/2010/09/15/if-you-have-problems-with-tfs-or-visual- studio-flush-the-user-cache-or-not/,但我没有找到在哪里运行devenv /resetuserdata命令。

好的,所以我刚刚添加C:\Program Files (x86)\Windows Kits\10\Include\10.0.17763.0\ucrtInclude Directories,它似乎可以工作。现在我必须手动将其添加到我拥有的每个项目中。

标签: visual-studio-2017

解决方案


我遇到了同样的问题,只针对 mpc-be:有一个名为 platform.props 的文件用于查找环境。变种。调用 $(MPCBE_WINSDK_VER) 如果找不到它,它会将 WindowsTargetPlatformVersion 元素设置为 8.1。将此“8.1”更改为您喜欢的任何其他版本(如“10.0”)。


推荐阅读